luyatests\core\helpers\StringHelperTest::testArrayStrictContains PHP Method

testArrayStrictContains() public method

    public function testArrayStrictContains()
    {
        $this->assertTrue(StringHelper::contains(['foo', 'bar'], 'hello foo bar', true));
        // enabled $strict mode
        $this->assertFalse(StringHelper::contains(['notexistings', 'bar'], 'hello bar foo', true));
        // enabled $strict mode
        $this->assertFalse(StringHelper::contains(['bar', 'notexistings'], 'hello bar foo', true));
        // enabled $strict mode
        $this->assertFalse(StringHelper::contains(['notexistings'], 'hello bar foo', true));
        // enabled strict mode
        $this->assertTrue(StringHelper::contains(['a', 'b', 'c'], 'thesmallabc', true));
    }