Skip to content

Commit

Permalink
Functions fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Vitexus committed Jul 11, 2023
1 parent 51692e5 commit e06cc3d
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 9 deletions.
3 changes: 2 additions & 1 deletion src/Ease/Functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,11 @@
* @category Common
*
* @author Vitex <vitex@hippy.cz>
* @copyright 2019-2022 Vitex@hippy.cz (G)
* @copyright 2019-2023 Vitex@hippy.cz (G)
* @license https://opensource.org/licenses/MIT GPL-2
*
* PHP 7
* PHP 8
*/

namespace Ease;
Expand Down
17 changes: 9 additions & 8 deletions tests/src/Ease/FunctionsTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@

namespace Test\Ease;

use Functions;

use Ease\Functions;

/**
* Description of FunctionsTest
Expand Down Expand Up @@ -53,9 +54,9 @@ public function testAddUrlParams()
public function testLinkify()
{
$this->assertEquals('<a href="https://v.s.cz/">v.s.cz/</a>',
\Functions::linkify('https://v.s.cz/'));
Functions::linkify('https://v.s.cz/'));
$this->assertEquals('<a a="1" href="mailto:info@vitexsoftware.cz">info@vitexsoftware.cz</a>',
\Functions::linkify('info@vitexsoftware.cz', ['mail'],
Functions::linkify('info@vitexsoftware.cz', ['mail'],
['a' => 1]));
}

Expand All @@ -67,9 +68,9 @@ public function testDivDataArray()
$sourceArray = ['a' => 1, 'b' => 2, 'c' => 3];
$destinationArray = [];

$this->assertTrue(\Functions::divDataArray($sourceArray,
$this->assertTrue(Functions::divDataArray($sourceArray,
$destinationArray, 'b'));
$this->assertFalse(\Functions::divDataArray($sourceArray,
$this->assertFalse(Functions::divDataArray($sourceArray,
$destinationArray, 'b'));

$this->assertEquals(['a' => 1, 'c' => 3], $sourceArray);
Expand All @@ -81,8 +82,8 @@ public function testDivDataArray()
*/
public function testIsAssoc()
{
$this->assertTrue(\Functions::isAssoc(['a' => 'b']));
$this->assertFalse(\Functions::isAssoc(['a', 'b']));
$this->assertTrue(Functions::isAssoc(['a' => 'b']));
$this->assertFalse(Functions::isAssoc(['a', 'b']));
}

/**
Expand Down Expand Up @@ -280,6 +281,6 @@ public function testCfg()
*/
public function testclassesInNamespace()
{
$this->assertIsArray(\Functions::classesInNamespace('Ease'));
$this->assertIsArray(Functions::classesInNamespace('Ease'));
}
}
1 change: 1 addition & 0 deletions tests/src/Ease/SharedTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
namespace Test\Ease;

use Ease\Shared;
use Ease\Functions;

/**
* Generated by PHPUnit_SkeletonGenerator on 2016-01-17 at 23:58:11.
Expand Down

0 comments on commit e06cc3d

Please sign in to comment.