Ejemplo n.º 1
0
 /**
  * DataProvider for PasswordTest::testCheck
  */
 public function checkProvider()
 {
     $user = new User();
     $user->hash = crypt('password', '$2y$07$' . Helper::genStr());
     return [[$user, 'password', true], [$user, 'wrongPassword', false]];
 }
Ejemplo n.º 2
0
 /**
  * Unit-test for Helper::makeAlias
  * @group RootClasses
  * @covers Veles\Helper::makeAlias
  * @depends testTranslit
  * @dataProvider makeAliasProvider
  * @see Helper::makeAlias
  */
 public function testMakeAlias($url, $expected)
 {
     $result = Helper::makeAlias($url);
     $msg = "URL \"{$url}\" has wrong make alias result: \"{$result}\"";
     $this->assertSame($expected, $result, $msg);
 }