Skip to content

Commit

Permalink
updating ExpressionTests with new readonly param
Browse files Browse the repository at this point in the history
  • Loading branch information
helyakin committed Jan 17, 2024
1 parent a29ad46 commit 5143183
Show file tree
Hide file tree
Showing 18 changed files with 49 additions and 0 deletions.
3 changes: 3 additions & 0 deletions tests/Unit/Expressions/ForClasses/ContainDocBlockLikeTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ public function test_it_should_return_true_if_contains_doc_block(): void
false,
false,
false,
false,
['/** */myDocBlock with other information']
);
$because = 'we want to add this rule for our software';
Expand Down Expand Up @@ -53,6 +54,7 @@ public function test_it_should_return_true_if_contains_doc_block_without_because
false,
false,
false,
false,
['/** */myDocBlock with other information']
);
$violations = new Violations();
Expand All @@ -79,6 +81,7 @@ public function test_it_should_return_false_if_not_contains_doc_block(): void
false,
false,
false,
false,
['/** */myDocBlock with other information']
);
$because = 'we want to add this rule for our software';
Expand Down
1 change: 1 addition & 0 deletions tests/Unit/Expressions/ForClasses/ExtendTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ public function test_it_should_return_violation_error_if_extend_is_null(): void
false,
false,
false,
false,
false
);

Expand Down
3 changes: 3 additions & 0 deletions tests/Unit/Expressions/ForClasses/HaveAttributeTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ public function test_it_should_return_true_if_contains_doc_block(): void
false,
false,
false,
false,
[],
[FullyQualifiedClassName::fromString('myAttribute')]
);
Expand Down Expand Up @@ -54,6 +55,7 @@ public function test_it_should_return_true_if_contains_doc_block_without_because
false,
false,
false,
false,
[],
[FullyQualifiedClassName::fromString('myAttribute')]
);
Expand Down Expand Up @@ -81,6 +83,7 @@ public function test_it_should_return_false_if_not_contains_doc_block(): void
false,
false,
false,
false,
[],
[FullyQualifiedClassName::fromString('myAttribute')]
);
Expand Down
5 changes: 5 additions & 0 deletions tests/Unit/Expressions/ForClasses/ImplementTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ public function test_it_should_return_violation_error(): void
false,
false,
false,
false,
false
);

Expand Down Expand Up @@ -53,6 +54,7 @@ public function test_it_should_return_true_if_not_depends_on_namespace(): void
false,
false,
false,
false,
false
);
$because = 'we want to add this rule for our software';
Expand All @@ -75,6 +77,7 @@ public function test_it_should_return_false_if_depends_on_namespace(): void
false,
false,
false,
false,
false
);
$because = 'we want to add this rule for our software';
Expand All @@ -98,6 +101,7 @@ public function test_it_should_check_the_complete_fqcn(): void
false,
false,
false,
false,
false
);
$violations = new Violations();
Expand All @@ -118,6 +122,7 @@ public function test_it_should_return_if_is_an_interface(): void
false,
false,
false,
false,
true,
false
);
Expand Down
2 changes: 2 additions & 0 deletions tests/Unit/Expressions/ForClasses/IsAbstractTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ public function test_it_should_return_violation_error(): void
false,
false,
false,
false,
false
);
$because = 'we want to add this rule for our software';
Expand All @@ -46,6 +47,7 @@ public function test_it_should_return_true_if_is_abstract(): void
null,
true,
true,
true,
false,
false,
false
Expand Down
2 changes: 2 additions & 0 deletions tests/Unit/Expressions/ForClasses/IsEnumTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ public function test_it_should_return_violation_error(): void
false,
false,
false,
false,
false
);
$because = 'we want to add this rule for our software';
Expand All @@ -47,6 +48,7 @@ public function test_it_should_return_true_if_is_enum(): void
false,
false,
false,
false,
true
);
$because = 'we want to add this rule for our software';
Expand Down
6 changes: 6 additions & 0 deletions tests/Unit/Expressions/ForClasses/IsFinalTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ public function test_it_should_return_violation_error(): void
false,
false,
false,
false,
false
);
$because = 'we want to add this rule for our software';
Expand All @@ -50,6 +51,7 @@ public function test_it_should_return_true_if_is_final(): void
false,
false,
false,
false,
false
);
$because = 'we want to add this rule for our software';
Expand All @@ -69,6 +71,7 @@ public function test_abstract_classes_can_not_be_final_and_should_be_ignored():
[],
null,
false,
false,
true,
false,
false,
Expand All @@ -92,6 +95,7 @@ public function test_interfaces_can_not_be_final_and_should_be_ignored(): void
null,
false,
false,
false,
true,
false,
false
Expand All @@ -115,6 +119,7 @@ public function test_traits_can_not_be_final_and_should_be_ignored(): void
false,
false,
false,
false,
true,
false
);
Expand All @@ -138,6 +143,7 @@ public function test_enums_can_not_be_final_and_should_be_ignored(): void
false,
false,
false,
false,
true
);
$because = 'we want to add this rule for our software';
Expand Down
2 changes: 2 additions & 0 deletions tests/Unit/Expressions/ForClasses/IsInterfaceTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ public function test_it_should_return_violation_error(): void
false,
false,
false,
false,
false
);
$because = 'we want to add this rule for our software';
Expand All @@ -46,6 +47,7 @@ public function test_it_should_return_true_if_is_interface(): void
null,
false,
false,
false,
true,
false,
false
Expand Down
2 changes: 2 additions & 0 deletions tests/Unit/Expressions/ForClasses/IsNotAbstractTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ public function test_it_should_return_violation_error(): void
[],
null,
true,
false,
true,
false,
false,
Expand Down Expand Up @@ -48,6 +49,7 @@ public function test_it_should_return_true_if_is_abstract(): void
false,
false,
false,
false,
false
);
$because = 'we want to add this rule for our software';
Expand Down
2 changes: 2 additions & 0 deletions tests/Unit/Expressions/ForClasses/IsNotEnumTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ public function test_it_should_return_violation_error(): void
false,
false,
false,
false,
true
);
$because = 'we want to add this rule for our software';
Expand All @@ -47,6 +48,7 @@ public function test_it_should_return_true_if_is_not_enum(): void
false,
false,
false,
false,
false
);
$because = 'we want to add this rule for our software';
Expand Down
2 changes: 2 additions & 0 deletions tests/Unit/Expressions/ForClasses/IsNotFinalTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ public function test_it_should_return_violation_error(): void
false,
false,
false,
false,
false
);

Expand All @@ -49,6 +50,7 @@ public function test_it_should_return_true_if_is_final(): void
false,
false,
false,
false,
false
);
$because = 'we want to add this rule for our software';
Expand Down
2 changes: 2 additions & 0 deletions tests/Unit/Expressions/ForClasses/IsNotInterfaceTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ public function test_it_should_return_violation_error(): void
null,
false,
false,
false,
true,
false,
false
Expand All @@ -48,6 +49,7 @@ public function test_it_should_return_true_if_is_not_interface(): void
false,
false,
false,
false,
false
);
$because = 'we want to add this rule for our software';
Expand Down
2 changes: 2 additions & 0 deletions tests/Unit/Expressions/ForClasses/IsNotTraitTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ public function test_it_should_return_violation_error(): void
false,
false,
false,
false,
true,
false
);
Expand All @@ -48,6 +49,7 @@ public function test_it_should_return_true_if_is_not_trait(): void
false,
false,
false,
false,
false
);
$because = 'we want to add this rule for our software';
Expand Down
2 changes: 2 additions & 0 deletions tests/Unit/Expressions/ForClasses/IsTraitTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ public function test_it_should_return_violation_error(): void
false,
false,
false,
false,
false
);
$because = 'we want to add this rule for our software';
Expand All @@ -47,6 +48,7 @@ public function test_it_should_return_true_if_is_trait(): void
false,
false,
false,
false,
true,
false
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ public function test_it_should_return_true_if_not_contains_doc_block(): void
false,
false,
false,
false,
['/** */myDocBlock with other information']
);
$because = 'we want to add this rule for our software';
Expand Down Expand Up @@ -53,6 +54,7 @@ public function test_it_should_return_false_if_contains_doc_block_without_becaus
false,
false,
false,
false,
['/** */myDocBlock with other information']
);
$violations = new Violations();
Expand All @@ -79,6 +81,7 @@ public function test_it_should_return_false_if_contains_doc_block(): void
false,
false,
false,
false,
['/** */myDocBlock with other information']
);
$because = 'we want to add this rule for our software';
Expand Down
2 changes: 2 additions & 0 deletions tests/Unit/Expressions/ForClasses/NotExtendTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ public function test_it_should_return_violation_error(): void
false,
false,
false,
false,
false
);
$because = 'we want to add this rule for our software';
Expand All @@ -50,6 +51,7 @@ public function test_it_should_not_return_violation_error_if_extends_another_cla
false,
false,
false,
false,
false
);
$because = 'we want to add this rule for our software';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ public function test_it_should_return_violation_error(): void
false,
false,
false,
false,
false
);
$because = 'we want to add this rule for our software';
Expand All @@ -49,6 +50,7 @@ public function test_it_should_return_true_if_not_depends_on_namespace(): void
false,
false,
false,
false,
false
);
$because = 'we want to add this rule for our software';
Expand All @@ -69,6 +71,7 @@ public function test_it_should_return_false_if_depends_on_namespace(): void
false,
false,
false,
false,
false
);
$because = 'we want to add this rule for our software';
Expand All @@ -89,6 +92,7 @@ public function test_it_should_not_return_violation_error_if_dependency_excluded
false,
false,
false,
false,
false
);
$because = 'we want to add this rule for our software';
Expand Down
4 changes: 4 additions & 0 deletions tests/Unit/Expressions/ForClasses/NotImplementTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ public function test_it_should_return_violation_error(): void
false,
false,
false,
false,
false
);

Expand All @@ -51,6 +52,7 @@ public function test_it_should_return_true_if_not_depends_on_namespace(): void
false,
false,
false,
false,
false
);
$because = 'we want to add this rule for our software';
Expand All @@ -73,6 +75,7 @@ public function test_it_should_return_false_if_depends_on_namespace(): void
false,
false,
false,
false,
false
);

Expand Down Expand Up @@ -101,6 +104,7 @@ public function test_it_should_return_if_is_an_interface(): void
null,
false,
false,
false,
true,
false,
false
Expand Down

0 comments on commit 5143183

Please sign in to comment.