Skip to content

Commit

Permalink
Move methods
Browse files Browse the repository at this point in the history
  • Loading branch information
sebastianbergmann committed Dec 2, 2018
1 parent 5a5b982 commit a86d16d
Showing 1 changed file with 28 additions and 28 deletions.
56 changes: 28 additions & 28 deletions src/Framework/Assert.php
Original file line number Diff line number Diff line change
Expand Up @@ -164,34 +164,6 @@ public static function assertArrayNotHasKey($key, $array, string $message = ''):
static::assertThat($array, $constraint, $message);
}

public static function assertStringContainsString(string $needle, string $haystack, string $message = ''): void
{
$constraint = new StringContains($needle, false);

static::assertThat($haystack, $constraint, $message);
}

public static function assertStringContainsStringIgnoringCase(string $needle, string $haystack, string $message = ''): void
{
$constraint = new StringContains($needle, true);

static::assertThat($haystack, $constraint, $message);
}

public static function assertStringNotContainsString(string $needle, string $haystack, string $message = ''): void
{
$constraint = new LogicalNot(new StringContains($needle));

static::assertThat($haystack, $constraint, $message);
}

public static function assertStringNotContainsStringIgnoringCase(string $needle, string $haystack, string $message = ''): void
{
$constraint = new LogicalNot(new StringContains($needle, true));

static::assertThat($haystack, $constraint, $message);
}

/**
* Asserts that a haystack contains a needle.
*
Expand Down Expand Up @@ -2093,6 +2065,34 @@ public static function assertStringStartsNotWith($prefix, $string, string $messa
);
}

public static function assertStringContainsString(string $needle, string $haystack, string $message = ''): void
{
$constraint = new StringContains($needle, false);

static::assertThat($haystack, $constraint, $message);
}

public static function assertStringContainsStringIgnoringCase(string $needle, string $haystack, string $message = ''): void
{
$constraint = new StringContains($needle, true);

static::assertThat($haystack, $constraint, $message);
}

public static function assertStringNotContainsString(string $needle, string $haystack, string $message = ''): void
{
$constraint = new LogicalNot(new StringContains($needle));

static::assertThat($haystack, $constraint, $message);
}

public static function assertStringNotContainsStringIgnoringCase(string $needle, string $haystack, string $message = ''): void
{
$constraint = new LogicalNot(new StringContains($needle, true));

static::assertThat($haystack, $constraint, $message);
}

/**
* Asserts that a string ends with a given suffix.
*
Expand Down

0 comments on commit a86d16d

Please sign in to comment.