Skip to content

Commit c9608ce

Browse files
Merge branch '11.1'
2 parents 654b6c6 + fb9c7de commit c9608ce

File tree

2 files changed

+61
-0
lines changed

2 files changed

+61
-0
lines changed
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
<?php declare(strict_types=1);
2+
/*
3+
* This file is part of PHPUnit.
4+
*
5+
* (c) Sebastian Bergmann <sebastian@phpunit.de>
6+
*
7+
* For the full copyright and license information, please view the LICENSE
8+
* file that was distributed with this source code.
9+
*/
10+
namespace PHPUnit\DeprecatedAnnotationsTestFixture;
11+
12+
use PHPUnit\Framework\TestCase;
13+
14+
/**
15+
* @small
16+
*/
17+
final class TestSizeConfiguredWithAnnotationTest extends TestCase
18+
{
19+
public function testOne(): void
20+
{
21+
$this->assertTrue(true);
22+
}
23+
}
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
--TEST--
2+
The right events are emitted in the right order for a successful test that has a size that is configured with annotation
3+
--FILE--
4+
<?php declare(strict_types=1);
5+
$traceFile = tempnam(sys_get_temp_dir(), __FILE__);
6+
7+
$_SERVER['argv'][] = '--do-not-cache-result';
8+
$_SERVER['argv'][] = '--no-configuration';
9+
$_SERVER['argv'][] = '--no-output';
10+
$_SERVER['argv'][] = '--log-events-text';
11+
$_SERVER['argv'][] = $traceFile;
12+
$_SERVER['argv'][] = __DIR__ . '/../_files/TestSizeConfiguredWithAnnotationTest.php';
13+
14+
require __DIR__ . '/../../bootstrap.php';
15+
16+
(new PHPUnit\TextUI\Application)->run($_SERVER['argv']);
17+
18+
print file_get_contents($traceFile);
19+
20+
unlink($traceFile);
21+
--EXPECTF--
22+
PHPUnit Started (PHPUnit %s using %s)
23+
Test Runner Configured
24+
Test Runner Triggered Deprecation (Metadata found in doc-comment for class PHPUnit\DeprecatedAnnotationsTestFixture\TestSizeConfiguredWithAnnotationTest. Metadata in doc-comments is deprecated and will no longer be supported in PHPUnit 12. Update your test code to use attributes instead.)
25+
Test Suite Loaded (1 test)
26+
Event Facade Sealed
27+
Test Runner Started
28+
Test Suite Sorted
29+
Test Runner Execution Started (1 test)
30+
Test Suite Started (PHPUnit\DeprecatedAnnotationsTestFixture\TestSizeConfiguredWithAnnotationTest, 1 test)
31+
Test Preparation Started (PHPUnit\DeprecatedAnnotationsTestFixture\TestSizeConfiguredWithAnnotationTest::testOne)
32+
Test Prepared (PHPUnit\DeprecatedAnnotationsTestFixture\TestSizeConfiguredWithAnnotationTest::testOne)
33+
Test Passed (PHPUnit\DeprecatedAnnotationsTestFixture\TestSizeConfiguredWithAnnotationTest::testOne)
34+
Test Finished (PHPUnit\DeprecatedAnnotationsTestFixture\TestSizeConfiguredWithAnnotationTest::testOne)
35+
Test Suite Finished (PHPUnit\DeprecatedAnnotationsTestFixture\TestSizeConfiguredWithAnnotationTest, 1 test)
36+
Test Runner Execution Finished
37+
Test Runner Finished
38+
PHPUnit Finished (Shell Exit Code: 0)

0 commit comments

Comments
 (0)