File tree Expand file tree Collapse file tree 2 files changed +17
-8
lines changed
Common/DataFixtures/Executor Expand file tree Collapse file tree 2 files changed +17
-8
lines changed Original file line number Diff line number Diff line change 9
9
use Doctrine \Common \DataFixtures \Purger \PHPCRPurger ;
10
10
use Doctrine \ODM \PHPCR \DocumentManager ;
11
11
use Doctrine \Tests \Common \DataFixtures \BaseTestCase ;
12
+ use Doctrine \Tests \Mock \PHPCRDocumentManager ;
12
13
use Exception ;
13
14
use PHPUnit \Framework \MockObject \MockObject ;
14
15
use Throwable ;
@@ -125,20 +126,15 @@ private function getPurger(): PHPCRPurger
125
126
return $ this ->createMock (PHPCRPurger::class);
126
127
}
127
128
128
- /** @return DocumentManager &MockObject */
129
- private function getDocumentManager (): DocumentManager
129
+ /** @return PHPCRDocumentManager &MockObject */
130
+ private function getDocumentManager (): PHPCRDocumentManager
130
131
{
131
132
if (! class_exists (DocumentManager::class)) {
132
133
$ this ->markTestSkipped ('Missing doctrine/phpcr-odm ' );
133
134
}
134
135
135
136
return $ this
136
- ->getMockBuilder (DocumentManager::class)
137
- ->addMethods ([
138
- 'transactional ' ,
139
- 'flush ' ,
140
- 'clear ' ,
141
- ])
137
+ ->getMockBuilder (PHPCRDocumentManager::class)
142
138
->disableOriginalConstructor ()
143
139
->getMock ();
144
140
}
Original file line number Diff line number Diff line change
1
+ <?php
2
+
3
+ declare (strict_types=1 );
4
+
5
+ namespace Doctrine \Tests \Mock ;
6
+
7
+ use Closure ;
8
+ use Doctrine \ODM \PHPCR \DocumentManager ;
9
+
10
+ abstract class PHPCRDocumentManager extends DocumentManager
11
+ {
12
+ abstract public function transactional (Closure $ func ): void ;
13
+ }
You can’t perform that action at this time.
0 commit comments