lundi 29 août 2016

How to unit test helper functions/custom classes laravel

I have these test cases visiting urls and checking for right behavior but I cant make it work because it errors on my helper functions within the view.

It works on the browser but not in tests.

    /** @test */
    public function setUp()
    {
        parent::setUp();

    }

    /** @test **/   
    public function openAdminDashboardUnauthorized()
    {    
        $crawler = $this->client->request('GET', 'admin/organizations');
        $this->assertTrue($this->client->getResponse()->isOk());

    }

    /** @test **/
    public function tearDown()
    {
        parent::tearDown();            
    }

by the way, this is on laravel 4.2

Aucun commentaire:

Enregistrer un commentaire