autoFollowRedirection = false; $this->logInAs('admin'); $this->assertTrue((bool)Permission::check("ADMIN")); $this->assertEquals(200, $this->get('ModelAdminTest_Admin')->getStatusCode()); } } class ModelAdminTest_Admin extends ModelAdmin implements TestOnly { static $url_segment = 'testadmin'; public static $managed_models = array( 'ModelAdminTest_Contact', ); } class ModelAdminTest_Contact extends DataObject implements TestOnly { static $db = array( "Name" => "Varchar", "Phone" => "Varchar", ); }