Skip to content

Commit aec1b82

Browse files
committed
Add negative tests that show correct repository
1 parent f07d357 commit aec1b82

File tree

4 files changed

+24
-0
lines changed

4 files changed

+24
-0
lines changed
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
[
2+
{
3+
"message": "Call to an undefined method PHPStan\\DoctrineIntegration\\ODM\\CustomRepositoryUsage\\MyRepository::nonexistant().",
4+
"line": 31,
5+
"ignorable": true
6+
}
7+
]

tests/DoctrineIntegration/ODM/data/customRepositoryUsage.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,11 @@ public function get(): void
2525
$test = $this->repository->get('testing');
2626
$test->doSomethingElse();
2727
}
28+
29+
public function nonexistant(): void
30+
{
31+
$this->repository->nonexistant();
32+
}
2833
}
2934

3035
/**
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
[
2+
{
3+
"message": "Call to an undefined method PHPStan\\DoctrineIntegration\\ORM\\CustomRepositoryUsage\\MyRepository::nonexistant().",
4+
"line": 30,
5+
"ignorable": true
6+
}
7+
]

tests/DoctrineIntegration/ORM/data/customRepositoryUsage.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,11 @@ public function get(): void
2424
$test = $this->repository->get(1);
2525
$test->doSomethingElse();
2626
}
27+
28+
public function nonexistant(): void
29+
{
30+
$this->repository->nonexistant();
31+
}
2732
}
2833

2934
/**

0 commit comments

Comments
 (0)