public function testToArray() { $table = $this->getMockBuilder(Table::class)->disableOriginalConstructor()->getMock(); $table->expects($this->once())->method('reportColumnsUsage')->with($this->equalTo(array_keys(self::$languageRow))); $row = new Row($table, self::$languageRow, true); $this->assertEquals(self::$languageRow, $row->toArray()); }
public function testFill() { $data = array('id' => 1); $row = new Row('user', $data, $this->phactory); $arr = $row->toArray(); $this->assertEquals($data, $arr); $data['name'] = null; $arr = $row->fill()->toArray(); $this->assertEquals($data, $arr); }