File tree Expand file tree Collapse file tree 1 file changed +23
-0
lines changed
tests/TestCase/ORM/Locator Expand file tree Collapse file tree 1 file changed +23
-0
lines changed Original file line number Diff line number Diff line change @@ -41,10 +41,33 @@ public function setUp()
41
41
* @return void
42
42
*/
43
43
public function testTableLocator ()
44
+ {
45
+ $ tableLocator = $ this ->subject ->tableLocator ();
46
+ $ this ->assertSame (TableRegistry::getTableLocator (), $ tableLocator );
47
+
48
+ $ newLocator = $ this ->getMockBuilder ('Cake\ORM\Locator\LocatorInterface ' )->getMock ();
49
+ $ subjectLocator = $ this ->subject ->tableLocator ($ newLocator );
50
+ $ this ->assertSame ($ newLocator , $ subjectLocator );
51
+ }
52
+
53
+ /**
54
+ * Tests testGetTableLocator method
55
+ *
56
+ * @return void
57
+ */
58
+ public function testGetTableLocator ()
44
59
{
45
60
$ tableLocator = $ this ->subject ->getTableLocator ();
46
61
$ this ->assertSame (TableRegistry::getTableLocator (), $ tableLocator );
62
+ }
47
63
64
+ /**
65
+ * Tests testSetTableLocator method
66
+ *
67
+ * @return void
68
+ */
69
+ public function testSetTableLocator ()
70
+ {
48
71
$ newLocator = $ this ->getMockBuilder ('Cake\ORM\Locator\LocatorInterface ' )->getMock ();
49
72
$ this ->subject ->setTableLocator ($ newLocator );
50
73
$ subjectLocator = $ this ->subject ->getTableLocator ();
You can’t perform that action at this time.
0 commit comments