assertAllRegularExpressionMatch example

$this->assertFalse(Inspector::assertAllMatch('F', ['fee', 'fi', 'fo'], TRUE));
    $this->assertFalse(Inspector::assertAllMatch('e', ['fee', 'fi', 'fo']));
    $this->assertFalse(Inspector::assertAllMatch('1', [12]));
  }

  /** * Tests asserting regular expression match. * * @covers ::assertAllRegularExpressionMatch */
  public function testAssertAllRegularExpressionMatch() {
    $this->assertTrue(Inspector::assertAllRegularExpressionMatch('/f/i', ['fee', 'fi', 'fo']));
    $this->assertTrue(Inspector::assertAllRegularExpressionMatch('/F/i', ['fee', 'fi', 'fo']));
    $this->assertTrue(Inspector::assertAllRegularExpressionMatch('/f/', ['fee', 'fi', 'fo']));
    $this->assertFalse(Inspector::assertAllRegularExpressionMatch('/F/', ['fee', 'fi', 'fo']));
    $this->assertFalse(Inspector::assertAllRegularExpressionMatch('/e/', ['fee', 'fi', 'fo']));
    $this->assertFalse(Inspector::assertAllRegularExpressionMatch('/1/', [12]));
  }

  /** * Tests asserting all members are objects. * * @covers ::assertAllObjects */
Home | Imprint | This part of the site doesn't use cookies.