Skip to content

Commit

Permalink
fixed testCreateUrl
Browse files Browse the repository at this point in the history
  • Loading branch information
hiqsol committed Nov 30, 2015
1 parent 1ccdca2 commit baeab52
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions tests/unit/ModuleTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
use hiqdev\yii2\cart\Module;
use hiqdev\yii2\cart\ShoppingCart;
use Yii;
use yii\helpers\Url;
use yii\web\Application;

/**
Expand Down Expand Up @@ -58,10 +59,10 @@ public function testGetCart()
}
public function testCreateUrl()
{
$this->assertSame('/cart/cart/index', $this->object->createUrl());
$this->assertSame('/cart/cart/something', $this->object->createUrl('something'));
$this->assertSame('/cart/cart/order?a=b', $this->object->createUrl(['order', 'a' => 'b']));
$this->assertSame('/cart/test/order?a=b', $this->object->createUrl(['test/order', 'a' => 'b']));
$this->assertSame(Url::to('/cart/cart/index'), $this->object->createUrl());
$this->assertSame(Url::to('/cart/cart/something'), $this->object->createUrl('something'));
$this->assertSame(Url::to(['/cart/cart/order', 'a' => 2]), $this->object->createUrl(['order', 'a' => 2]));
$this->assertSame(Url::to(['/cart/test/order', 'a' => 2]), $this->object->createUrl(['test/order', 'a' => 2]));
}

protected $methods = 'a and b';
Expand Down

0 comments on commit baeab52

Please sign in to comment.