mirror of
https://github.com/salesagility/SuiteCRM.git
synced 2024-11-23 00:12:37 +00:00
26aab7535d
Signed-off-by: Dillon-Brown <dillon.brown@salesagility.com>
27 lines
704 B
PHP
27 lines
704 B
PHP
<?php
|
|
|
|
use SuiteCRM\Test\SuitePHPUnitFrameworkTestCase;
|
|
use SuiteCRM\Utility\StringValidator;
|
|
|
|
class StringValidatorTest extends SuitePHPUnitFrameworkTestCase
|
|
{
|
|
/**
|
|
* @var \UnitTester
|
|
*/
|
|
protected $tester;
|
|
|
|
public function testStartsWith(): void
|
|
{
|
|
$testString = 'foobarbaz';
|
|
self::assertTrue(StringValidator::startsWith($testString, 'foo'));
|
|
self::assertFalse(StringValidator::startsWith($testString, 'bar'));
|
|
}
|
|
|
|
public function testEndsWith(): void
|
|
{
|
|
$testString = 'foobarbaz';
|
|
self::assertTrue(StringValidator::endsWith($testString, 'baz'));
|
|
self::assertFalse(StringValidator::endsWith($testString, 'bar'));
|
|
}
|
|
}
|