Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
47 changes: 0 additions & 47 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2969,53 +2969,6 @@ parameters:

<br>

### NoMockOnlyTestRule

Test should have at least one non-mocked property, to test something

```php
use PHPUnit\Framework\MockObject\MockObject;
use PHPUnit\Framework\TestCase;

class SomeTest extends TestCase
{
private MockObject $firstMock;
private MockObject $secondMock;

public function setUp()
{
$this->firstMock = $this->createMock(SomeService::class);
$this->secondMock = $this->createMock(AnotherService::class);
}
}
```

:x:

<br>

```php
use PHPUnit\Framework\MockObject\MockObject;
use PHPUnit\Framework\TestCase;

class SomeTest extends TestCase
{
private SomeService $someService;

private MockObject $firstMock;

public function setUp()
{
$this->someService = new SomeService();
$this->firstMock = $this->createMock(AnotherService::class);
}
}
```

:+1:

<br>

### NoMockObjectAndRealObjectPropertyRule

Avoid using one property for both real object and mock object. Use separate properties or single type instead
Expand Down
3 changes: 0 additions & 3 deletions config/mock-rules.neon
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
conditionalTags:
# mocking
Symplify\PHPStanRules\Rules\PHPUnit\NoMockOnlyTestRule:
phpstan.rules.rule: %symplify.mocks%
Symplify\PHPStanRules\Rules\PHPUnit\NoMockObjectAndRealObjectPropertyRule:
phpstan.rules.rule: %symplify.mocks%

Expand Down Expand Up @@ -30,7 +28,6 @@ conditionalTags:
phpstan.rules.rule: %symplify.mocks%

services:
- Symplify\PHPStanRules\Rules\PHPUnit\NoMockOnlyTestRule
- Symplify\PHPStanRules\Rules\PHPUnit\NoMockObjectAndRealObjectPropertyRule
- Symplify\PHPStanRules\Rules\PHPUnit\NoDoubleConsecutiveTestMockRule
- Symplify\PHPStanRules\Rules\PHPUnit\ExplicitExpectsMockMethodRule
Expand Down
5 changes: 0 additions & 5 deletions src/Enum/SymfonyClass.php
Original file line number Diff line number Diff line change
Expand Up @@ -86,11 +86,6 @@ final class SymfonyClass
*/
public const COMMAND = 'Symfony\Component\Console\Command\Command';

/**
* @var string
*/
public const VALIDATOR_TEST_CASE = 'Symfony\Component\Validator\Test\ConstraintValidatorTestCase';

/**
* @var string
*/
Expand Down
84 changes: 0 additions & 84 deletions src/Rules/PHPUnit/NoMockOnlyTestRule.php

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

41 changes: 0 additions & 41 deletions tests/Rules/PHPUnit/NoMockOnlyTestRule/NoMockOnlyTestRuleTest.php

This file was deleted.

7 changes: 0 additions & 7 deletions tests/Rules/PHPUnit/NoMockOnlyTestRule/Source/FirstClass.php

This file was deleted.

7 changes: 0 additions & 7 deletions tests/Rules/PHPUnit/NoMockOnlyTestRule/Source/SecondClass.php

This file was deleted.

Loading