extractPhonenumber($subject); $this->assertCount($expectedCount, $result->getFound()); $this->assertEquals($filteredSubject, $result->getFilteredSubject()); $this->assertEquals($expected, $result->getFound()); } public function provideData() { yield ['Diallo', 0, [], 'Diallo', "no phonenumber"]; yield ['Diallo 15/06/2021', 0, [], 'Diallo 15/06/2021', "no phonenumber and a date"]; yield ['Diallo 0486 123 456', 1, ['+32486123456'], 'Diallo', "a phonenumber and a name"]; yield ['Diallo 123 456', 1, ['123456'], 'Diallo', "a number and a name, without leadiing 0"]; yield ['123 456', 1, ['123456'], '', "only phonenumber"]; yield ['0123 456', 1, ['+32123456'], '', "only phonenumber with a leading 0"]; } }