Skip to content

Commit

Permalink
[#13439] - Reworked some tests
Browse files Browse the repository at this point in the history
  • Loading branch information
niden committed May 9, 2019
1 parent c47db6c commit 9d3de66
Show file tree
Hide file tree
Showing 10 changed files with 68 additions and 224 deletions.
35 changes: 0 additions & 35 deletions tests/integration/Mvc/View/CacheCest.php

This file was deleted.

35 changes: 0 additions & 35 deletions tests/integration/Mvc/View/GetCacheCest.php

This file was deleted.

35 changes: 0 additions & 35 deletions tests/integration/Mvc/View/GetEventsManagerCest.php

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,19 @@
namespace Phalcon\Test\Integration\Mvc\View;

use IntegrationTester;
use Phalcon\Di;
use Phalcon\Mvc\View;
use Phalcon\Test\Fixtures\Traits\DiTrait;

/**
* Class GetDICest
* Class GetSetDICest
*/
class GetDICest
class GetSetDICest
{
use DiTrait;

/**
* Tests Phalcon\Mvc\View :: getDI()
* Tests Phalcon\Mvc\View :: getDI()/setDI()
*
* @param IntegrationTester $I
*
Expand All @@ -29,7 +34,15 @@ class GetDICest
*/
public function mvcViewGetDI(IntegrationTester $I)
{
$I->wantToTest('Mvc\View - getDI()');
$I->skipTest('Need implementation');
$I->wantToTest('Mvc\View - getDI()/setDI()');

$container = new Di();
$view = new View();

$view->setDI($container);

$class = Di::class;
$actual = $view->getDI();
$I->assertInstanceOf($class, $actual);
}
}
46 changes: 46 additions & 0 deletions tests/integration/Mvc/View/GetSetEventsManagerCest.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
<?php
declare(strict_types=1);

/**
* This file is part of the Phalcon Framework.
*
* (c) Phalcon Team <[email protected]>
*
* For the full copyright and license information, please view the LICENSE.txt
* file that was distributed with this source code.
*/

namespace Phalcon\Test\Integration\Mvc\View;

use IntegrationTester;
use Phalcon\Mvc\View;
use Phalcon\Test\Fixtures\Traits\DiTrait;

/**
* Class GetSetEventsManagerCest
*/
class GetSetEventsManagerCest
{
use DiTrait;

/**
* Tests Phalcon\Mvc\View :: getEventsManager()/setEventsManager()
*
* @param IntegrationTester $I
*
* @author Phalcon Team <[email protected]>
* @since 2018-11-13
*/
public function mvcViewGetSetEventsManager(IntegrationTester $I)
{
$I->wantToTest('Mvc\View - getEventsManager()/setEventsManager()');

$manager = $this->newEventsManager();
$view = new View();

$view->setEventsManager($manager);

$actual = $view->getEventsManager();
$I->assertEquals($manager, $actual);
}
}
35 changes: 0 additions & 35 deletions tests/integration/Mvc/View/IsCachingCest.php

This file was deleted.

35 changes: 0 additions & 35 deletions tests/integration/Mvc/View/SetDICest.php

This file was deleted.

35 changes: 0 additions & 35 deletions tests/integration/Mvc/View/SetEventsManagerCest.php

This file was deleted.

2 changes: 1 addition & 1 deletion tests/integration/Mvc/View/Simple/PartialCest.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@
namespace Phalcon\Test\Integration\Mvc\View\Simple;

use IntegrationTester;
use Phalcon\Test\Fixtures\Traits\DiTrait;
use function ob_end_clean;
use function ob_start;
use Phalcon\Test\Fixtures\Traits\DiTrait;

/**
* Class PartialCest
Expand Down
11 changes: 3 additions & 8 deletions tests/integration/Mvc/View/Simple/RenderCest.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,19 +13,14 @@
namespace Phalcon\Test\Integration\Mvc\View\Simple;

use IntegrationTester;
use function ob_end_clean;
use function ob_get_level;
use function ob_start;
use Phalcon\Cache\Adapter\Stream;
use Phalcon\Mvc\View\Engine\Volt;
use Phalcon\Mvc\View\Exception;
use Phalcon\Mvc\View\Simple;
use Phalcon\Test\Fixtures\Traits\DiTrait;
use Phalcon\Test\Fixtures\Traits\ViewTrait;
use function cacheModelsDir;
use function dataDir;
use function file_get_contents;
use function json_decode;
use function ob_end_clean;
use function ob_get_level;
use function ob_start;
use function sprintf;

class RenderCest
Expand Down

0 comments on commit 9d3de66

Please sign in to comment.