Sfoglia il codice sorgente

Use URL helper in acceptance tests (#80)

Routing should be handled by URL helper
Michael Bodnarchuk 9 anni fa
parent
commit
a322cdb0a5
1 ha cambiato i file con 2 aggiunte e 1 eliminazioni
  1. 2 1
      tests/acceptance/HomeCest.php

+ 2 - 1
tests/acceptance/HomeCest.php

@@ -1,10 +1,11 @@
 <?php
+use yii\helpers\Url as Url;
 
 class HomeCest
 {
     public function ensureThatHomePageWorks(AcceptanceTester $I)
     {
-        $I->amOnPage('index.php?r=site%2Findex');        
+        $I->amOnPage(Url::toRoute('/site/index'));        
         $I->see('My Company');
         
         $I->seeLink('About');