示例#1
0
    public function testMany2One()
    {
        $object = new Many2One();
        $this->assertEquals('* @method string getName()
* @method $this setName(string $name)
* @method One2Many getOne()
* @method $this setOne(One2Many $one)
', $object->_generatePhpDoc());
    }
 public function testMany2OneOne2Many()
 {
     $one = new One2Many();
     $many = new Many2One();
     $many->setOne($one);
     $this->assertInstanceOf('Saxulum\\Tests\\Accessor\\Fixtures\\Mapping\\Many2One', $one->getManies()[0]);
     $this->assertInstanceOf('Saxulum\\Tests\\Accessor\\Fixtures\\Mapping\\One2Many', $many->getOne());
     $one->removeManies($many);
     $this->assertCount(0, $one->getManies());
     $this->assertEquals(null, $many->getOne());
 }