1 | <?php |
||
12 | class SaveOnFailure implements TestListener |
||
|
|||
13 | { |
||
14 | /** |
||
15 | * Convert an attribute strigng from a relative to absolute, by providing a base_url. |
||
16 | * |
||
17 | * @param string $attribute name of the attribute, e.g. src, href |
||
18 | * @param string $content the string where to do the change |
||
19 | * @param string $base_url |
||
20 | * |
||
21 | * @return string |
||
22 | */ |
||
23 | 8 | public static function to_absolute_attribute($attribute, $content, $base_url = null) |
|
27 | |||
28 | /** |
||
29 | * Check if a directory does not exist, create it, otherwise check if it is writable. |
||
30 | * |
||
31 | * @param string $directory |
||
32 | * |
||
33 | * @throws Exception If directory is not writable |
||
34 | */ |
||
35 | 2 | public static function autocreate_directory($directory) |
|
45 | |||
46 | /** |
||
47 | * Delete all the files from a directory. |
||
48 | * |
||
49 | * @param string $directory |
||
50 | */ |
||
51 | 2 | public static function clear_directory($directory) |
|
59 | |||
60 | /** |
||
61 | * Execute a php script and get the output of that script as a string, optionally pass variables as an associative array to be converted to local variables inside of the file. |
||
62 | * |
||
63 | * @param string $filename |
||
64 | * @param array $data |
||
65 | * |
||
66 | * @return string |
||
67 | */ |
||
68 | 1 | public static function render_file($filename, array $data = []) |
|
77 | |||
78 | protected $_directory; |
||
79 | protected $_base_url; |
||
80 | |||
81 | 1 | public function __construct($directory, $base_url) |
|
93 | |||
94 | /** |
||
95 | * Save the current content of the driver into an html file. Add javascript errors, messages and a title to the html content. |
||
96 | * |
||
97 | * @param \Openbuildings\Spiderling\Driver $driver |
||
98 | * @param string $filename |
||
99 | * @param string $title |
||
100 | */ |
||
101 | 1 | public function save_driver_content(\Openbuildings\Spiderling\Driver $driver, $filename, $title) |
|
126 | |||
127 | /** |
||
128 | * Implement PHPUnit\Framework\TestListener, save driver content if there was an error. |
||
129 | * |
||
130 | * @param Test $test |
||
131 | * @param Exception $exception |
||
132 | * @param int $time |
||
133 | */ |
||
134 | 1 | public function addError(Test $test, Throwable $exception, float $time): void |
|
144 | |||
145 | /** |
||
146 | * Implement PHPUnit\Framework\TestListener, save driver content if there was an error. |
||
147 | * |
||
148 | * @param Test $test |
||
149 | * @param \PHPUnit\Framework\AssertionFailedError $failure |
||
150 | * @param int $time |
||
151 | */ |
||
152 | 1 | public function addFailure(Test $test, AssertionFailedError $failure, float $time): void |
|
162 | |||
163 | // @codeCoverageIgnoreStart |
||
164 | public function addWarning(Test $test, Warning $e, float $time): void |
||
167 | |||
168 | public function addRiskyTest(Test $test, Throwable $e, float $time): void |
||
171 | |||
172 | public function addIncompleteTest(Test $test, Throwable $e, float $time): void |
||
175 | |||
176 | public function addSkippedTest(Test $test, Throwable $e, float $time): void |
||
179 | |||
180 | public function startTest(Test $test): void |
||
183 | |||
184 | public function endTest(Test $test, float $time): void |
||
187 | |||
188 | public function startTestSuite(TestSuite $suite): void |
||
191 | |||
192 | public function endTestSuite(TestSuite $suite): void |
||
195 | |||
196 | // @codeCoverageIgnoreEnd |
||
197 | } |
||
198 |
This class, trait or interface has been deprecated. The supplier of the file has supplied an explanatory message.
The explanatory message should give you some clue as to whether and when the type will be removed from the class and what other constant to use instead.