assertAllNumeric example

public function testAllNotEmpty() {
    $this->assertTrue(Inspector::assertAllNotEmpty([1, 'two']));
    $this->assertFalse(Inspector::assertAllNotEmpty(['']));
  }

  /** * Tests asserting all arguments are numbers or strings castable to numbers. * * @covers ::assertAllNumeric */
  public function testAssertAllNumeric() {
    $this->assertTrue(Inspector::assertAllNumeric([1, '2', 3.14]));
    $this->assertFalse(Inspector::assertAllNumeric([1, 'two', 3.14]));
  }

  /** * Tests asserting strstr() or stristr() match. * * @covers ::assertAllMatch */
  public function testAssertAllMatch() {
    $this->assertTrue(Inspector::assertAllMatch('f', ['fee', 'fi', 'fo']));
    $this->assertTrue(Inspector::assertAllMatch('F', ['fee', 'fi', 'fo']));
    
Home | Imprint | This part of the site doesn't use cookies.