Passed
Push — master ( 0bdb25...cfec6f )
by John
01:28
created

DestroyTest::intProvider()   A

Complexity

Conditions 2
Paths 2

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 2
eloc 2
c 1
b 0
f 0
nc 2
nop 0
dl 0
loc 4
rs 10
1
<?php
2
3
declare(strict_types=1);
4
5
/**
6
 * @package   phpunit-garbage-collector
7
 * @version   1.0.0
8
 * @author    John Rayes <[email protected]>
9
 * @copyright Copyright (c) 2022, John Rayes
10
 * @license   http://opensource.org/licenses/MIT MIT
11
 */
12
13
use PHPUnit\Framework\TestCase;
14
15
class DestroyTest extends TestCase
16
{
17
	public function intProvider(): iterable
18
	{
19
		for ($i = 0; $i < 10; $i++)
20
			yield [$i];
21
	}
22
23
	/**
24
	 * @dataProvider intProvider
25
	 */
26
	public function testInt(int $i): void
27
	{
28
		$this->assertIsInt($i);
29
	}
30
31
	public function __destruct()
32
	{
33
		echo "x\n";
34
	}
35
}
36
37
/*
38
 * SAMPLE OUTPUT
39
 *
40
 * PHPUnit 9.5.26 by Sebastian Bergmann and contributors.
41
 * 
42
 * Runtime:       PHP 8.1.1
43
 * Configuration: C:\...\phpunit.xml
44
 * Warning:       No code coverage driver available
45
 * 
46
 * ..........                                                        10 / 10 (100%)
47
 * 
48
 * Time: 00:00.024, Memory: 6.00 MB
49
 * 
50
 * OK (10 tests, 10 assertions)
51
 * x
52
 * x
53
 * x
54
 * x
55
 * x
56
 * x
57
 * x
58
 * x
59
 * x
60
 * x
61
 *
62
 * EXPECTED OUTPUT
63
 *
64
 * PHPUnit 9.5.26 by Sebastian Bergmann and contributors.
65
 * 
66
 * Runtime:       PHP 8.1.1
67
 * Configuration: C:\...\phpunit.xml
68
 * Warning:       No code coverage driver available
69
 * 
70
 * .x
71
 * .x
72
 * .x
73
 * .x
74
 * .x
75
 * .x
76
 * .x
77
 * .x
78
 * .x
79
 * .                                                        10 / 10 (100%)x
80
 * 
81
 * 
82
 * Time: 00:00.019, Memory: 6.00 MB
83
 * 
84
 * OK (10 tests, 10 assertions)
85
 */
86