Skip to content

Commit

Permalink
Use TestCase::assertAttributeEquals() to test attribues instead of a …
Browse files Browse the repository at this point in the history
…custom solution
  • Loading branch information
PHLAK committed Oct 19, 2019
1 parent 6509a4c commit 2bd304a
Show file tree
Hide file tree
Showing 89 changed files with 92 additions and 106 deletions.
1 change: 1 addition & 0 deletions tests/ArrayAccessTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
namespace PHLAK\Twine\Tests;

use PHLAK\Twine;
use PHPUnit\Framework\TestCase;

class ArrayAccessTest extends TestCase
{
Expand Down
2 changes: 1 addition & 1 deletion tests/Config/StrTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
namespace PHLAK\Twine\Tests\Config;

use PHLAK\Twine;
use PHLAK\Twine\Tests\TestCase;
use PHPUnit\Framework\TestCase;

class StrTest extends TestCase
{
Expand Down
1 change: 1 addition & 0 deletions tests/ConfigExceptionTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

use PHLAK\Twine\Exceptions\ConfigException;
use PHLAK\Twine\Exceptions\TwineException;
use PHPUnit\Framework\TestCase;

class ConfigExceptionTest extends TestCase
{
Expand Down
1 change: 1 addition & 0 deletions tests/EncryptionExceptionTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

use PHLAK\Twine\Exceptions\EncryptionException;
use PHLAK\Twine\Exceptions\TwineException;
use PHPUnit\Framework\TestCase;

class EncryptionExceptionTest extends TestCase
{
Expand Down
2 changes: 1 addition & 1 deletion tests/Methods/AfterTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
namespace PHLAK\Twine\Tests\Methods;

use PHLAK\Twine;
use PHLAK\Twine\Tests\TestCase;
use PHPUnit\Framework\TestCase;

class AfterTest extends TestCase
{
Expand Down
2 changes: 1 addition & 1 deletion tests/Methods/AppendTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
namespace PHLAK\Twine\Tests\Methods;

use PHLAK\Twine;
use PHLAK\Twine\Tests\TestCase;
use PHPUnit\Framework\TestCase;

class AppendTest extends TestCase
{
Expand Down
2 changes: 1 addition & 1 deletion tests/Methods/Base64DecodeTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
namespace PHLAK\Twine\Tests\Methods;

use PHLAK\Twine;
use PHLAK\Twine\Tests\TestCase;
use PHPUnit\Framework\TestCase;

class Base64DecodeTest extends TestCase
{
Expand Down
2 changes: 1 addition & 1 deletion tests/Methods/Base64EncodeTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
namespace PHLAK\Twine\Tests\Methods;

use PHLAK\Twine;
use PHLAK\Twine\Tests\TestCase;
use PHPUnit\Framework\TestCase;

class Base64EncodeTest extends TestCase
{
Expand Down
2 changes: 1 addition & 1 deletion tests/Methods/Base64Test.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

use PHLAK\Twine;
use PHLAK\Twine\Exceptions\ConfigException;
use PHLAK\Twine\Tests\TestCase;
use PHPUnit\Framework\TestCase;

class Base64Test extends TestCase
{
Expand Down
2 changes: 1 addition & 1 deletion tests/Methods/BcryptTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
namespace PHLAK\Twine\Tests\Methods;

use PHLAK\Twine;
use PHLAK\Twine\Tests\TestCase;
use PHPUnit\Framework\TestCase;

class BcryptTest extends TestCase
{
Expand Down
2 changes: 1 addition & 1 deletion tests/Methods/BeforeTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
namespace PHLAK\Twine\Tests\Methods;

use PHLAK\Twine;
use PHLAK\Twine\Tests\TestCase;
use PHPUnit\Framework\TestCase;

class BeforeTest extends TestCase
{
Expand Down
2 changes: 1 addition & 1 deletion tests/Methods/CamelCaseTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
namespace PHLAK\Twine\Tests\Methods;

use PHLAK\Twine;
use PHLAK\Twine\Tests\TestCase;
use PHPUnit\Framework\TestCase;

class CamelCaseTest extends TestCase
{
Expand Down
2 changes: 1 addition & 1 deletion tests/Methods/CharactersTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
namespace PHLAK\Twine\Tests\Methods;

use PHLAK\Twine;
use PHLAK\Twine\Tests\TestCase;
use PHPUnit\Framework\TestCase;

class CharactersTest extends TestCase
{
Expand Down
2 changes: 1 addition & 1 deletion tests/Methods/ChunkTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
namespace PHLAK\Twine\Tests\Methods;

use PHLAK\Twine;
use PHLAK\Twine\Tests\TestCase;
use PHPUnit\Framework\TestCase;

class ChunkTest extends TestCase
{
Expand Down
2 changes: 1 addition & 1 deletion tests/Methods/ContainsTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
namespace PHLAK\Twine\Tests\Methods;

use PHLAK\Twine;
use PHLAK\Twine\Tests\TestCase;
use PHPUnit\Framework\TestCase;

class ContainsTest extends TestCase
{
Expand Down
2 changes: 1 addition & 1 deletion tests/Methods/CountTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
namespace PHLAK\Twine\Tests\Methods;

use PHLAK\Twine;
use PHLAK\Twine\Tests\TestCase;
use PHPUnit\Framework\TestCase;

class CountTest extends TestCase
{
Expand Down
2 changes: 1 addition & 1 deletion tests/Methods/Crc32Test.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
namespace PHLAK\Twine\Tests\Methods;

use PHLAK\Twine;
use PHLAK\Twine\Tests\TestCase;
use PHPUnit\Framework\TestCase;

class Crc32Test extends TestCase
{
Expand Down
2 changes: 1 addition & 1 deletion tests/Methods/CryptTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
namespace PHLAK\Twine\Tests\Methods;

use PHLAK\Twine;
use PHLAK\Twine\Tests\TestCase;
use PHPUnit\Framework\TestCase;

class CryptTest extends TestCase
{
Expand Down
2 changes: 1 addition & 1 deletion tests/Methods/DecryptTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

use PHLAK\Twine;
use PHLAK\Twine\Exceptions\DecryptionException;
use PHLAK\Twine\Tests\TestCase;
use PHPUnit\Framework\TestCase;

class DecryptTest extends TestCase
{
Expand Down
2 changes: 1 addition & 1 deletion tests/Methods/EchoTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
namespace PHLAK\Twine\Tests\Methods;

use PHLAK\Twine;
use PHLAK\Twine\Tests\TestCase;
use PHPUnit\Framework\TestCase;

class EchoTest extends TestCase
{
Expand Down
4 changes: 2 additions & 2 deletions tests/Methods/EncodingTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
namespace PHLAK\Twine\Tests\Methods;

use PHLAK\Twine;
use PHLAK\Twine\Tests\TestCase;
use PHPUnit\Framework\TestCase;

class EncodingTest extends TestCase
{
Expand All @@ -14,6 +14,6 @@ public function test_it_can_set_the_internal_encoding()
$ascii = $string->encoding('ASCII');

$this->assertInstanceOf(Twine\Str::class, $ascii);
$this->assertEquals('ASCII', $this->getAttributeValue($ascii, 'encoding'));
$this->assertAttributeEquals('ASCII', 'encoding', $ascii);
}
}
2 changes: 1 addition & 1 deletion tests/Methods/EncryptTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

use PHLAK\Twine;
use PHLAK\Twine\Exceptions\EncryptionException;
use PHLAK\Twine\Tests\TestCase;
use PHPUnit\Framework\TestCase;

class EncryptTest extends TestCase
{
Expand Down
2 changes: 1 addition & 1 deletion tests/Methods/EndsWithTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
namespace PHLAK\Twine\Tests\Methods;

use PHLAK\Twine;
use PHLAK\Twine\Tests\TestCase;
use PHPUnit\Framework\TestCase;

class EndsWithTest extends TestCase
{
Expand Down
2 changes: 1 addition & 1 deletion tests/Methods/EqualsTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
namespace PHLAK\Twine\Tests\Methods;

use PHLAK\Twine;
use PHLAK\Twine\Tests\TestCase;
use PHPUnit\Framework\TestCase;

class EqualsTest extends TestCase
{
Expand Down
2 changes: 1 addition & 1 deletion tests/Methods/ExplodeTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
namespace PHLAK\Twine\Tests\Methods;

use PHLAK\Twine;
use PHLAK\Twine\Tests\TestCase;
use PHPUnit\Framework\TestCase;

class ExplodeTest extends TestCase
{
Expand Down
2 changes: 1 addition & 1 deletion tests/Methods/FirstTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
namespace PHLAK\Twine\Tests\Methods;

use PHLAK\Twine;
use PHLAK\Twine\Tests\TestCase;
use PHPUnit\Framework\TestCase;

class FirstTest extends TestCase
{
Expand Down
2 changes: 1 addition & 1 deletion tests/Methods/FormatTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
namespace PHLAK\Twine\Tests\Methods;

use PHLAK\Twine;
use PHLAK\Twine\Tests\TestCase;
use PHPUnit\Framework\TestCase;

class FormatTest extends TestCase
{
Expand Down
2 changes: 1 addition & 1 deletion tests/Methods/FromTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
namespace PHLAK\Twine\Tests\Methods;

use PHLAK\Twine;
use PHLAK\Twine\Tests\TestCase;
use PHPUnit\Framework\TestCase;

class FromTest extends TestCase
{
Expand Down
2 changes: 1 addition & 1 deletion tests/Methods/HexDecodeTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
namespace PHLAK\Twine\Tests\Methods;

use PHLAK\Twine;
use PHLAK\Twine\Tests\TestCase;
use PHPUnit\Framework\TestCase;

class HexDecodeTest extends TestCase
{
Expand Down
2 changes: 1 addition & 1 deletion tests/Methods/HexEncodeTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
namespace PHLAK\Twine\Tests\Methods;

use PHLAK\Twine;
use PHLAK\Twine\Tests\TestCase;
use PHPUnit\Framework\TestCase;

class HexEncodeTest extends TestCase
{
Expand Down
2 changes: 1 addition & 1 deletion tests/Methods/HexTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
namespace PHLAK\Twine\Tests\Methods;

use PHLAK\Twine;
use PHLAK\Twine\Tests\TestCase;
use PHPUnit\Framework\TestCase;

class HexTest extends TestCase
{
Expand Down
2 changes: 1 addition & 1 deletion tests/Methods/InTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
namespace PHLAK\Twine\Tests\Methods;

use PHLAK\Twine;
use PHLAK\Twine\Tests\TestCase;
use PHPUnit\Framework\TestCase;

class InTest extends TestCase
{
Expand Down
2 changes: 1 addition & 1 deletion tests/Methods/InsensitiveMatchTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
namespace PHLAK\Twine\Tests\Methods;

use PHLAK\Twine;
use PHLAK\Twine\Tests\TestCase;
use PHPUnit\Framework\TestCase;

class InsensitiveMatchTest extends TestCase
{
Expand Down
2 changes: 1 addition & 1 deletion tests/Methods/InsertTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
namespace PHLAK\Twine\Tests\Methods;

use PHLAK\Twine;
use PHLAK\Twine\Tests\TestCase;
use PHPUnit\Framework\TestCase;

class InsertTest extends TestCase
{
Expand Down
2 changes: 1 addition & 1 deletion tests/Methods/IsAlphabeticTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
namespace PHLAK\Twine\Tests\Methods;

use PHLAK\Twine;
use PHLAK\Twine\Tests\TestCase;
use PHPUnit\Framework\TestCase;

class IsAlphabeticTest extends TestCase
{
Expand Down
2 changes: 1 addition & 1 deletion tests/Methods/IsAlphanumericTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
namespace PHLAK\Twine\Tests\Methods;

use PHLAK\Twine;
use PHLAK\Twine\Tests\TestCase;
use PHPUnit\Framework\TestCase;

class IsAlphanumericTest extends TestCase
{
Expand Down
2 changes: 1 addition & 1 deletion tests/Methods/IsEmptyTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
namespace PHLAK\Twine\Tests\Methods;

use PHLAK\Twine;
use PHLAK\Twine\Tests\TestCase;
use PHPUnit\Framework\TestCase;

class IsEmptyTest extends TestCase
{
Expand Down
2 changes: 1 addition & 1 deletion tests/Methods/IsLowercaseTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
namespace PHLAK\Twine\Tests\Methods;

use PHLAK\Twine;
use PHLAK\Twine\Tests\TestCase;
use PHPUnit\Framework\TestCase;

class IsLowercaseTest extends TestCase
{
Expand Down
2 changes: 1 addition & 1 deletion tests/Methods/IsNotEmptyTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
namespace PHLAK\Twine\Tests\Methods;

use PHLAK\Twine;
use PHLAK\Twine\Tests\TestCase;
use PHPUnit\Framework\TestCase;

class IsNotEmptyTest extends TestCase
{
Expand Down
2 changes: 1 addition & 1 deletion tests/Methods/IsNumericTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
namespace PHLAK\Twine\Tests\Methods;

use PHLAK\Twine;
use PHLAK\Twine\Tests\TestCase;
use PHPUnit\Framework\TestCase;

class IsNumericTest extends TestCase
{
Expand Down
2 changes: 1 addition & 1 deletion tests/Methods/IsPrintableTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
namespace PHLAK\Twine\Tests\Methods;

use PHLAK\Twine;
use PHLAK\Twine\Tests\TestCase;
use PHPUnit\Framework\TestCase;

class IsPrintableTest extends TestCase
{
Expand Down
2 changes: 1 addition & 1 deletion tests/Methods/IsPunctuationTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
namespace PHLAK\Twine\Tests\Methods;

use PHLAK\Twine;
use PHLAK\Twine\Tests\TestCase;
use PHPUnit\Framework\TestCase;

class IsPunctuationTest extends TestCase
{
Expand Down
2 changes: 1 addition & 1 deletion tests/Methods/IsUppercaseTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
namespace PHLAK\Twine\Tests\Methods;

use PHLAK\Twine;
use PHLAK\Twine\Tests\TestCase;
use PHPUnit\Framework\TestCase;

class IsUppercaseTest extends TestCase
{
Expand Down
Loading

0 comments on commit 2bd304a

Please sign in to comment.