public function test_cascade_deletes_file() { $file = \Model_File::forge(array( 'filename' => 'hiyo.jpg', )); $file->save(); $track = Test\Helper\Track::create(); $track->file = $file; $track->save(); $this->assertNotEmpty( $track->file ); $file_id = $track->file->id; $track = Model_Track::find( 1, array( "related" => "file" ) ); $track->delete(); $file = Model_File::find( $file_id ); $this->assertNull( $file ); }
1) Tests_Model_Track::test_cascade_deletes_file Orm\FrozenObject: No changes allowed.However, when I remove the following line from the test:
$track = Model_Track::find( 1, array( "related" => "file" ) );
It looks like you're new here. If you want to get involved, click one of these buttons!