/** * Method to test handleDeleteRelations(). * * @return void * * @covers Windwalker\Relation\Handler\AbstractRelationHandler::handleDeleteRelations */ public function testHandleDeleteRelations() { $itemTable = new StubTableRose(); $expectedTable = new StubTableRose(); $this->instance->handleDeleteRelations($itemTable); $this->assertTrue($itemTable->_delete); $this->instance->onDelete(Action::SET_NULL); $this->instance->foo_id = 'Foo'; $this->instance->bar_id = 'Bar'; $expectedTable->foo_id = null; $expectedTable->bar_id = null; $this->instance->handleDeleteRelations($itemTable); $this->assertEquals($expectedTable->getProperties(), $itemTable->getProperties()); }