Commit 34d0b708 authored by Guillaume Perréal's avatar Guillaume Perréal
Browse files

CS.

Showing with 19 additions and 7 deletions
+19 -7
<?php declare(strict_types=1);
/**
/*
* irstea/ng-model-generator-bundle generates Typescript interfaces for Angular using api-platform metadata.
* Copyright (C) 2018 IRSTEA
* All rights reserved.
* @copyright 2018 IRSTEA
* @author guillaume.perreal
*
* This program is free software: you can redistribute it and/or modify it under
* the terms of the GNU Lesser General Public License as published by the Free
* Software Foundation, either version 3 of the License, or (at your option) any
* later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT ANY
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
* PARTICULAR PURPOSE. See the GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License and the GNU
* Lesser General Public License along with this program. If not, see
* <https://www.gnu.org/licenses/>.
*/
namespace Irstea\NgModelGeneratorBundle\Tests\Iterators;
......@@ -12,7 +23,7 @@ use Irstea\NgModelGeneratorBundle\Iterators\UniqueFilter;
use PHPUnit\Framework\TestCase;
/**
* Class UniqueFilterTest
* Class UniqueFilterTest.
*/
class UniqueFilterTest extends TestCase
{
......@@ -26,7 +37,8 @@ class UniqueFilterTest extends TestCase
$this->tested = new UniqueFilter();
}
public function testKeepUniqueValues() {
public function testKeepUniqueValues()
{
$input = [4, 5, null, new \stdClass(), new \stdClass()];
self::assertEquals($input, array_filter($input, $this->tested));
}
......@@ -41,7 +53,7 @@ class UniqueFilterTest extends TestCase
self::assertEquals(count($expected), count($actual));
foreach($expected as $i => $value) {
foreach ($expected as $i => $value) {
self::assertSame($value, $actual[$i]);
}
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment