public function testInsertAtTop() { $t = new Table12(); $t->setTitle('new'); $t->setScopeValue(1); $t->insertAtTop(); $this->assertEquals(1, $t->getRank(), 'insertAtTop() sets the position to 1'); $this->assertTrue($t->isNew(), 'insertAtTop() doesn\'t save the object'); $t->save(); $expected = array(1 => 'new', 2 => 'row1', 3 => 'row2', 4 => 'row3', 5 => 'row4'); $this->assertEquals($expected, $this->getFixturesArrayWithScope(1), 'insertAtTop() shifts the entire suite'); $expected = array(1 => 'row5', 2 => 'row6'); $this->assertEquals($expected, $this->getFixturesArrayWithScope(2), 'insertAtTop() leaves other suites unchanged'); }