예제 #1
0
 /**
  * Test that plugin names are omitted from property()
  *
  * @return void
  */
 public function testPropertyNoPlugin()
 {
     $mock = $this->getMock('Cake\\ORM\\Table', [], [], '', false);
     $config = ['sourceTable' => $this->author, 'targetTable' => $mock];
     $association = new HasMany('Contacts.Addresses', $config);
     $this->assertEquals('addresses', $association->property());
 }
예제 #2
0
 /**
  * Test that plugin names are omitted from property()
  *
  * @return void
  */
 public function testPropertyNoPlugin()
 {
     $mock = $this->getMockBuilder('Cake\\ORM\\Table')->disableOriginalConstructor()->getMock();
     $config = ['sourceTable' => $this->author, 'targetTable' => $mock];
     $association = new HasMany('Contacts.Addresses', $config);
     $this->assertEquals('addresses', $association->property());
 }