1: <?php
2:
3: /**
4: * Jyxo PHP Library
5: *
6: * LICENSE
7: *
8: * This source file is subject to the new BSD license that is bundled
9: * with this package in the file license.txt.
10: * It is also available through the world-wide-web at this URL:
11: * https://github.com/jyxo/php/blob/master/license.txt
12: */
13:
14: namespace Jyxo\Beholder;
15:
16: /**
17: * Base abstract beholder test class.
18: *
19: * @category Jyxo
20: * @package Jyxo\Beholder
21: * @copyright Copyright (c) 2005-2011 Jyxo, s.r.o.
22: * @license https://github.com/jyxo/php/blob/master/license.txt
23: * @author Jan Matoušek
24: * @author Jaroslav Hanslík
25: */
26: abstract class TestCase
27: {
28: /**
29: * Short one-line test description.
30: *
31: * @var string
32: */
33: private $description = '';
34:
35: /**
36: * Constructor.
37: *
38: * @param string $description Short description
39: */
40: public function __construct($description)
41: {
42: $this->description = (string) $description;
43: }
44:
45: /**
46: * Performs the test.
47: *
48: * @return \Jyxo\Beholder\Result
49: */
50: abstract public function run();
51:
52: /**
53: * Returns the description.
54: *
55: * @return string
56: */
57: public function getDescription()
58: {
59: return $this->description;
60: }
61: }
62: