havietduc91 / yii-framework

0 stars 0 forks source link

Task: Quản lý keywork #3

Open havietduc91 opened 8 years ago

havietduc91 commented 8 years ago
havietduc91 commented 8 years ago
havietduc91 commented 8 years ago
Các phần cần confirm ở task #13964 Modifying the "Solution Providers" view
havietduc91 commented 8 years ago
Tìm customize dataTables
Tim hiểu về Vue.js
havietduc91 commented 8 years ago

Các chức năng cần test: intergration/repositories:

    /** @test */
    public function it_can_fetch_all_solution_providers()
    {
        $solutionProviders = $this->solutionProviderRepository->getAll();

        foreach($solutionProviders as $solutionProvider){
            $this->assertInstanceOf(SolutionProvider::class, $solutionProvider);
        }

        $this->assertCount(count($this->solution_provider), $solutionProviders);

    }

  /** test subcategory, main_category có giống nhau không**/

functional/Controller

public function non_admins_cannot_view_blog_posts_marked_as_draft(\FunctionalTester $I)
    {
        $I->am('A random website visitor');
        $I->amGoingTo('Try to view a Blog Post that is marked as draft');
        $I->amOnPage('/blog/example-unpublished-post');
        $I->canSeePageNotFound();
    }

    public function admins_can_view_blog_posts_marked_as_draft(\FunctionalTester $I)
    {
        $I->am('An Admin');
        $I->amGoingTo('Try to view a Blog Post that is marked as draft');
        $I->loginAsAdmin();
        $I->amOnPage('/blog/example-unpublished-post');
        $I->canSeeResponseCodeIs(200);
    }

    public function non_existing_blog_posts_should_give_an_404_error(\FunctionalTester $I)
    {
        $I->am('A random website visitor');
        $I->amGoingTo('Navigate to a blog post that doesnt exists');
        $I->amOnPage('/blog/random-slug');
        $I->canSeeResponseCodeIs(404);
    }