1<?php 2 3namespace Sabre\DAV\Auth\Backend; 4 5use Sabre\DAV; 6 7abstract class AbstractPDOTest extends \PHPUnit_Framework_TestCase { 8 9 abstract function getPDO(); 10 11 function testConstruct() { 12 13 $pdo = $this->getPDO(); 14 $backend = new PDO($pdo); 15 $this->assertTrue($backend instanceof PDO); 16 17 } 18 19 /** 20 * @depends testConstruct 21 */ 22 function testUserInfo() { 23 24 $pdo = $this->getPDO(); 25 $backend = new PDO($pdo); 26 27 $this->assertNull($backend->getDigestHash('realm','blabla')); 28 29 $expected = 'hash'; 30 31 $this->assertEquals($expected, $backend->getDigestHash('realm','user')); 32 33 } 34 35} 36