/** * Tests the table method * * @return void */ public function testTableMethod() { $table = new Table(['table' => 'users']); $this->assertEquals('users', $table->table()); $table = new UsersTable(); $this->assertEquals('users', $table->table()); $table = $this->getMockBuilder('Table')->setMethods(['find'])->setMockClassName('SpecialThingsTable')->getMock(); $this->assertEquals('special_things', $table->table()); $table = new Table(['alias' => 'LoveBoats']); $this->assertEquals('love_boats', $table->table()); $table->table('other'); $this->assertEquals('other', $table->table()); }