File tree Expand file tree Collapse file tree 4 files changed +85
-126
lines changed
Expand file tree Collapse file tree 4 files changed +85
-126
lines changed Original file line number Diff line number Diff line change 77
88return RectorConfig::configure ()
99 ->withPaths ([
10- __DIR__ . '\ . ' ,
10+ __DIR__ . '/ . ' ,
1111 ])
1212 ->withSkip ([
1313 __DIR__ . '/.git ' ,
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 22
33declare (strict_types=1 );
44
5- namespace Yousha \PhpSecurityLinter \Unit \Rules ;
5+ namespace Yousha \PhpSecurityLinter \Tests \ Unit \Rules ;
66
77use PHPUnit \Framework \TestCase ;
88use Yousha \PhpSecurityLinter \Rules \CisRules ;
@@ -11,11 +11,53 @@ final class CisRulesTest extends TestCase
1111{
1212 private array $ rules ;
1313
14+ /**
15+ * This method is called before the first test method in the test class is executed.
16+ *
17+ * @doesNotPerformAssertions
18+ *
19+ * @return void
20+ */
21+ public static function setUpBeforeClass (): void {}
22+
23+ /**
24+ * This method is called after the last test method in the test class has been executed.
25+ *
26+ * @doesNotPerformAssertions
27+ *
28+ * @return void
29+ */
30+ public static function tearDownAfterClass (): void
31+ {
32+ gc_collect_cycles ();
33+ }
34+
35+ /**
36+ * This method is called BEFORE each test method.
37+ *
38+ * @doesNotPerformAssertions
39+ *
40+ * @return void
41+ */
1442 protected function setUp (): void
1543 {
44+ parent ::setUp ();
1645 $ this ->rules = CisRules::getRules ();
1746 }
1847
48+ /**
49+ * This method is called AFTER each test method.
50+ *
51+ * @doesNotPerformAssertions
52+ *
53+ * @return void
54+ */
55+ protected function tearDown (): void
56+ {
57+ // Methods finalization codes.
58+ parent ::tearDown ();
59+ }
60+
1961 /**
2062 * Test that the rules array is correctly structured and not empty.
2163 */
Original file line number Diff line number Diff line change @@ -11,12 +11,53 @@ final class OwaspRulesTest extends TestCase
1111{
1212 private array $ rules ;
1313
14+ /**
15+ * This method is called before the first test method in the test class is executed.
16+ *
17+ * @doesNotPerformAssertions
18+ *
19+ * @return void
20+ */
21+ public static function setUpBeforeClass (): void {}
22+
23+ /**
24+ * This method is called after the last test method in the test class has been executed.
25+ *
26+ * @doesNotPerformAssertions
27+ *
28+ * @return void
29+ */
30+ public static function tearDownAfterClass (): void
31+ {
32+ gc_collect_cycles ();
33+ }
34+
35+ /**
36+ * This method is called BEFORE each test method.
37+ *
38+ * @doesNotPerformAssertions
39+ *
40+ * @return void
41+ */
1442 protected function setUp (): void
1543 {
1644 parent ::setUp ();
1745 $ this ->rules = OwaspRules::getRules ();
1846 }
1947
48+ /**
49+ * This method is called AFTER each test method.
50+ *
51+ * @doesNotPerformAssertions
52+ *
53+ * @return void
54+ */
55+ protected function tearDown (): void
56+ {
57+ // Methods finalization codes.
58+ parent ::tearDown ();
59+ }
60+
2061 public function ruleDataProvider (): array
2162 {
2263 $ rules = OwaspRules::getRules ();
You can’t perform that action at this time.
0 commit comments