Changeset View
Changeset View
Standalone View
Standalone View
tests/Strings/Multibyte/OmniStringTest.php
- This file was added.
<?php | |||||
declare(strict_types=1); | |||||
namespace Keruald\OmniTools\Tests\Strings\Multibyte; | |||||
use Keruald\OmniTools\Strings\Multibyte\OmniString; | |||||
use PHPUnit\Framework\TestCase; | |||||
use InvalidArgumentException; | |||||
class OmniStringTest extends TestCase { | |||||
/** | |||||
* @var OmniString | |||||
*/ | |||||
private $string; | |||||
protected function setUp () { | |||||
$this->string = new OmniString("foo"); | |||||
} | |||||
public function testToString () : void { | |||||
$this->assertEquals("foo", (string)$this->string); | |||||
$this->assertEquals("foo", $this->string->__toString()); | |||||
} | |||||
public function testPad () : void { | |||||
$paddedString = $this->string->pad(9, '-=-', STR_PAD_BOTH); | |||||
$this->assertEquals("-=-foo-=-", $paddedString); | |||||
} | |||||
} |
Nasqueron DevCentral · If it had been much bigger the moon would have had a core of ice. · Powered by Phabricator