This commit is contained in:
Christoph Wurst 2016-02-08 19:20:58 +01:00 коммит произвёл Thomas Müller
Родитель 61cdc1372f
Коммит 86383115ff
2 изменённых файлов: 5 добавлений и 6 удалений

Просмотреть файл

@ -19,10 +19,10 @@
* License along with this library. If not, see <http://www.gnu.org/licenses/>. * License along with this library. If not, see <http://www.gnu.org/licenses/>.
* *
*/ */
use PHPUnit_Framework_TestCase; use Test\TestCase;
use OCA\Mail\Controller\AutoCompleteController; use OCA\Mail\Controller\AutoCompleteController;
class AutoConfigControllerTest extends PHPUnit_Framework_TestCase { class AutoConfigControllerTest extends TestCase {
private $request; private $request;
private $service; private $service;

Просмотреть файл

@ -21,11 +21,11 @@
namespace OCA\Mail\Tests\Db; namespace OCA\Mail\Tests\Db;
use PHPUnit_Framework_TestCase; use Test\TestCase;
use OCA\Mail\Db\CollectedAddressMapper; use OCA\Mail\Db\CollectedAddressMapper;
use OCA\Mail\Db\CollectedAddress; use OCA\Mail\Db\CollectedAddress;
class CollectedAddressMapperTest extends PHPUnit_Framework_TestCase { class CollectedAddressMapperTest extends TestCase {
/** @var OCP\IDBConnection */ /** @var OCP\IDBConnection */
private $db; private $db;
@ -88,9 +88,8 @@ class CollectedAddressMapperTest extends PHPUnit_Framework_TestCase {
$this->assertCount(count($result), $matches); $this->assertCount(count($result), $matches);
$i = 0; $i = 0;
foreach ($matches as $match) { foreach ($matches as $match) {
error_log($match->getEmail());
$this->assertInstanceOf('\OCA\Mail\Db\CollectedAddress', $match); $this->assertInstanceOf('\OCA\Mail\Db\CollectedAddress', $match);
$this->assertEquals($result[$i], $match->getEmail()); $this->assertTrue(in_array($match->getEmail(), $result));
$this->assertEquals($this->userId, $match->getUserId()); $this->assertEquals($this->userId, $match->getUserId());
$i++; $i++;
} }