Pheasant\Tests\TableTest::testReplacingARow PHP Method

testReplacingARow() public method

public testReplacingARow ( )
    public function testReplacingARow()
    {
        $this->table->insert(array('firstname' => 'Llama', 'lastname' => 'Herder'));
        $this->table->insert(array('firstname' => 'Frank', 'lastname' => 'Farmer'));
        $this->table->replace(array('userid' => 1, 'firstname' => 'Alpaca', 'lastname' => 'Collector'));
        $this->assertRowCount(2, 'select * from user');
        $this->assertEquals(iterator_to_array($this->connection()->execute("select firstname from user")->column()), array('Alpaca', 'Frank'));
    }