File tree Expand file tree Collapse file tree 2 files changed +6
-6
lines changed
src/Yandex/Allure/Adapter Expand file tree Collapse file tree 2 files changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -41,7 +41,7 @@ Then add Allure test listener in **phpunit.xml** file:
41
41
<listeners >
42
42
<listener class =" Yandex\Allure\Adapter\AllureAdapter" file =" vendor/allure-framework/allure-phpunit/src/Yandex/Allure/Adapter/AllureAdapter.php" >
43
43
<arguments >
44
- <string >allure-report-data </string > <!-- XML files output directory -->
44
+ <string >build/ allure-results </string > <!-- XML files output directory -->
45
45
<boolean >true</boolean > <!-- Whether to delete previous results on rerun -->
46
46
<array > <!-- A list of custom annotations to ignore (optional) -->
47
47
<element key =" 0" >
@@ -181,7 +181,6 @@ If you wish to [attach some files](https://github.com/allure-framework/allure-co
181
181
namespace Example\Tests;
182
182
183
183
use PHPUnit_Framework_TestCase;
184
- use Yandex\Allure\Adapter\Model\AttachmentType;
185
184
use Yandex\Allure\Adapter\Support\AttachmentSupport;
186
185
187
186
class SomeTest extends PHPUnit_Framework_TestCase
@@ -193,7 +192,7 @@ class SomeTest extends PHPUnit_Framework_TestCase
193
192
{
194
193
//Some implementation here...
195
194
$filePath = $this->outputSomeContentToTemporaryFile();
196
- $this->addAttachment($filePath, 'Attachment human-readable name', AttachmentType::TXT );
195
+ $this->addAttachment($filePath, 'Attachment human-readable name', 'text/plain' );
197
196
//Some implementation here...
198
197
}
199
198
Original file line number Diff line number Diff line change 19
19
use Yandex \Allure \Adapter \Event \TestSuiteStartedEvent ;
20
20
use Yandex \Allure \Adapter \Model ;
21
21
22
- const DEFAULT_OUTPUT_DIRECTORY = "allure-report " ;
23
-
24
22
class AllureAdapter implements PHPUnit_Framework_TestListener
25
23
{
26
24
@@ -47,10 +45,13 @@ class AllureAdapter implements PHPUnit_Framework_TestListener
47
45
* @param array $ignoredAnnotations Extra annotaions to ignore in addition to standard PHPUnit annotations
48
46
*/
49
47
public function __construct (
50
- $ outputDirectory = DEFAULT_OUTPUT_DIRECTORY ,
48
+ $ outputDirectory ,
51
49
$ deletePreviousResults = false ,
52
50
array $ ignoredAnnotations = []
53
51
) {
52
+ if (!isset ($ outputDirectory )){
53
+ $ outputDirectory = 'build ' . DIRECTORY_SEPARATOR . 'allure-results ' ;
54
+ }
54
55
55
56
$ this ->prepareOutputDirectory ($ outputDirectory , $ deletePreviousResults );
56
57
You can’t perform that action at this time.
0 commit comments