Browse Source

Travis: Don't skip endroid/qr-code installation

pull/7725/head
Aleksander Machniak 5 years ago
parent
commit
8439f37663
  1. 2
      .ci/install.sh
  2. 8
      tests/Actions/Contacts/Copy.php
  3. 17
      tests/Actions/Login/Oauth.php

2
.ci/install.sh

@ -16,7 +16,7 @@ if [ "$BROWSER_TESTS" = 1 ]; then composer require "laravel/dusk:~5.9.1" --no-up
# Remove qr-code as it requires php-gd which is not always available on Travis
# and we don't really need it for tests
composer remove endroid/qr-code --no-update
# composer remove endroid/qr-code --no-update
# Install PHP dependencies
composer install --prefer-dist

8
tests/Actions/Contacts/Copy.php

@ -18,14 +18,6 @@ class Actions_Contacts_Copy extends ActionTestCase
$this->assertInstanceOf('rcmail_action', $action);
$this->assertTrue($action->checks());
/*
self::initDB('contacts');
$db = rcmail::get_instance()->get_dbh();
$query = $db->query('SELECT `contact_id` FROM `contacts` WHERE `user_id` = 1 LIMIT 1');
$result = $db->fetch_assoc($query);
*/
// Missing target addressbook
$_POST = [
'_cid' => 1,

17
tests/Actions/Login/Oauth.php

@ -8,12 +8,21 @@
class Actions_Login_Oauth extends ActionTestCase
{
/**
* Class constructor
* Test run
*/
function test_class()
function test_run_login_redirect()
{
$object = new rcmail_action_login_oauth;
$action = new rcmail_action_login_oauth;
$output = $this->initOutput(rcmail_action::MODE_HTTP, 'login', '');
$this->assertInstanceOf('rcmail_action', $object);
$this->assertInstanceOf('rcmail_action', $action);
$this->assertTrue($action->checks());
$this->runAndAssert($action, OutputHtmlMock::E_EXIT);
$result = $output->getOutput();
$this->assertSame("ERROR: Missing required OAuth config options 'oauth_auth_uri', 'oauth_client_id'", trim(StderrMock::$output));
$this->assertSame(null, $output->getOutput());
}
}
Loading…
Cancel
Save