Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test Phalcon\Http\Cookie:: GetDI() / SetDI() #14595

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
31 changes: 0 additions & 31 deletions tests/unit/Http/Cookie/GetDICest.php

This file was deleted.

46 changes: 46 additions & 0 deletions tests/unit/Http/Cookie/GetSetDICest.php
@@ -0,0 +1,46 @@
<?php
declare(strict_types=1);

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

namespace Phalcon\Test\Unit\Http\Cookie;

use Phalcon\Di;
use Phalcon\Http\Cookie;
use UnitTester;

class GetSetDICest
{
/**
* Tests Phalcon\Http\Cookie :: getDI() / setDI()
*
* @author Jeremy PASTOURET <https://github.com/jenovateurs>
* @since 2019-12-07
*/
public function httpCookieGetSetDI(UnitTester $I)
{
$I->wantToTest('Http\Cookie - getDI() / setDI()');

$container = new Di();

$cookie = new Cookie('test');

$cookie->setDI($container);

$I->assertSame(
$container,
$cookie->getDI()
);

$class = Di::class;
$actual = $cookie->getDI();
$I->assertInstanceOf($class, $actual);
}
}