Skip to content

Commit

Permalink
Merge pull request #368 from nextcloud/update-master-php-testing-vers…
Browse files Browse the repository at this point in the history
…ions

Update master php testing versions
  • Loading branch information
blizzz authored Jan 16, 2020
2 parents 292d454 + 005a2fc commit 44af25c
Show file tree
Hide file tree
Showing 8 changed files with 47 additions and 136 deletions.
163 changes: 37 additions & 126 deletions .drone.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ steps:
- cd tests/unit/
- phpunit --configuration phpunit.xml
- name: php7.3
image: nextcloudci/php7.3:php7.3-1
image: nextcloudci/php7.3:php7.3-5
environment:
APP_NAME: user_saml
CORE_BRANCH: master
Expand Down Expand Up @@ -81,137 +81,48 @@ trigger:
event:
- pull_request
- push

---
kind: pipeline
name: tests-17

clone:
depth: 1

steps:
- name: php7.2-stable17
image: nextcloudci/php7.2:php7.2-13
environment:
APP_NAME: user_saml
CORE_BRANCH: stable17
DB: sqlite
commands:
- wget https://raw.githubusercontent.com/nextcloud/travis_ci/master/before_install.sh
- bash ./before_install.sh $APP_NAME $CORE_BRANCH $DB
- cd ../server/apps/$APP_NAME
- cd tests/unit/
- phpunit --configuration phpunit.xml
- name: integration-tests-stable16
image: nextcloudci/user_saml_shibboleth-php7.2:user_saml_shibboleth_php7.2-2
environment:
CORE_BRANCH: stable17
commands:
- sed -i 's_/etc/init.d/jetty run \&_sleep 4 \&\& /etc/init.d/jetty run \&_' /start.sh
- /start.sh &
- sleep 7
- rm -rf /var/www/html
- cd /var/www/
- git clone --depth 1 -b $CORE_BRANCH https://github.com/nextcloud/server html
- cd /var/www/html && git submodule update --init
# use local clone
- cp -r /drone/src /var/www/html/apps/user_saml
- scl enable rh-php72 "bash -c 'php /var/www/html/occ maintenance:install --database sqlite --admin-pass password; php /var/www/html/occ app:enable user_saml'"
- chown -R apache:apache /var/www/html/
- scl enable rh-php72 "bash -c 'cd /var/www/html/apps/user_saml/tests/integration && vendor/bin/behat'"

trigger:
branch:
- master
event:
- pull_request
- push

---
kind: pipeline
name: tests-16
name: tests-18

clone:
depth: 1
depth: 1

steps:
- name: php7.1-stable16
image: nextcloudci/php7.1:php7.1-16
environment:
APP_NAME: user_saml
CORE_BRANCH: stable16
DB: sqlite
commands:
- wget https://raw.githubusercontent.com/nextcloud/travis_ci/master/before_install.sh
- bash ./before_install.sh $APP_NAME $CORE_BRANCH $DB
- cd ../server/apps/$APP_NAME
- cd tests/unit/
- phpunit --configuration phpunit.xml
- name: integration-tests-stable16
image: nextcloudci/user_saml_shibboleth-php7.2:user_saml_shibboleth_php7.2-2
environment:
CORE_BRANCH: stable16
commands:
- sed -i 's_/etc/init.d/jetty run \&_sleep 4 \&\& /etc/init.d/jetty run \&_' /start.sh
- /start.sh &
- sleep 7
- rm -rf /var/www/html
- cd /var/www/
- git clone --depth 1 -b $CORE_BRANCH https://github.com/nextcloud/server html
- cd /var/www/html && git submodule update --init
# use local clone
- cp -r /drone/src /var/www/html/apps/user_saml
- scl enable rh-php72 "bash -c 'php /var/www/html/occ maintenance:install --database sqlite --admin-pass password; php /var/www/html/occ app:enable user_saml'"
- chown -R apache:apache /var/www/html/
- scl enable rh-php72 "bash -c 'cd /var/www/html/apps/user_saml/tests/integration && vendor/bin/behat'"
- name: php7.3-stable18
image: nextcloudci/php7.3:php7.3-5
environment:
APP_NAME: user_saml
CORE_BRANCH: stable18
DB: sqlite
commands:
- wget https://raw.githubusercontent.com/nextcloud/travis_ci/master/before_install.sh
- bash ./before_install.sh $APP_NAME $CORE_BRANCH $DB
- cd ../server/apps/$APP_NAME
- cd tests/unit/
- phpunit --configuration phpunit.xml
- name: integration-tests-stable18
image: nextcloudci/user_saml_shibboleth-php7.2:user_saml_shibboleth_php7.2-2
environment:
CORE_BRANCH: stable18
commands:
- sed -i 's_/etc/init.d/jetty run \&_sleep 4 \&\& /etc/init.d/jetty run \&_' /start.sh
- /start.sh &
- sleep 7
- rm -rf /var/www/html
- cd /var/www/
- git clone --depth 1 -b $CORE_BRANCH https://github.com/nextcloud/server html
- cd /var/www/html && git submodule update --init
# use local clone
- cp -r /drone/src /var/www/html/apps/user_saml
- scl enable rh-php72 "bash -c 'php /var/www/html/occ maintenance:install --database sqlite --admin-pass password; php /var/www/html/occ app:enable user_saml'"
- chown -R apache:apache /var/www/html/
- scl enable rh-php72 "bash -c 'cd /var/www/html/apps/user_saml/tests/integration && vendor/bin/behat'"

trigger:
branch:
- master
event:
- pull_request
- push

---
kind: pipeline
name: tests-15

clone:
depth: 1

steps:
- name: php7.0-stable15
image: nextcloudci/php7.0:php7.0-19
environment:
APP_NAME: user_saml
CORE_BRANCH: stable15
DB: sqlite
commands:
- wget https://raw.githubusercontent.com/nextcloud/travis_ci/master/before_install.sh
- bash ./before_install.sh $APP_NAME $CORE_BRANCH $DB
- cd ../server/apps/$APP_NAME
- cd tests/unit/
- phpunit --configuration phpunit.xml
- name: integration-tests-stable15
image: nextcloudci/user_saml_shibboleth-php7:user_saml_shibboleth_php7-5
environment:
CORE_BRANCH: stable15
commands:
- /start.sh &
- sleep 3
- rm -rf /var/www/html
- cd /var/www/
- git clone --depth 1 -b $CORE_BRANCH https://github.com/nextcloud/server html
- cd /var/www/html && git submodule update --init
# use local clone
- cp -r /drone/src /var/www/html/apps/user_saml
- scl enable rh-php70 "bash -c 'php /var/www/html/occ maintenance:install --database sqlite --admin-pass password; php /var/www/html/occ app:enable user_saml'"
- chown -R apache:apache /var/www/html/
- scl enable rh-php70 "bash -c 'cd /var/www/html/apps/user_saml/tests/integration && vendor/bin/behat'"
branch:
- master
event:
- pull_request
- push

trigger:
branch:
- master
event:
- pull_request
- push
2 changes: 1 addition & 1 deletion appinfo/info.xml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ While theoretically any other authentication provider implementing either one of
<screenshot>https://raw.githubusercontent.com/nextcloud/user_saml/master/screenshots/1.png</screenshot>
<screenshot>https://raw.githubusercontent.com/nextcloud/user_saml/master/screenshots/2.png</screenshot>
<dependencies>
<nextcloud min-version="15" max-version="18" />
<nextcloud min-version="18" max-version="18" />
</dependencies>
<settings>
<admin>OCA\User_SAML\Settings\Admin</admin>
Expand Down
2 changes: 1 addition & 1 deletion tests/unit/AppInfo/ApplicationTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ class ApplicationTest extends \Test\TestCase {
/** @var \OCP\AppFramework\IAppContainer */
protected $container;

protected function setUp() {
protected function setUp(): void {
parent::setUp();
$this->app = new Application();
$this->container = $this->app->getContainer();
Expand Down
2 changes: 1 addition & 1 deletion tests/unit/Controller/SAMLControllerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ class SAMLControllerTest extends TestCase {
/** @var SAMLController */
private $samlController;

public function setUp() {
protected function setUp(): void {
parent::setUp();

$this->request = $this->createMock(IRequest::class);
Expand Down
4 changes: 2 additions & 2 deletions tests/unit/Middleware/OnlyLoggedInMiddlewareTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,15 +35,15 @@ class OnlyLoggedInMiddlewareTest extends \Test\TestCase {
/** @var OnlyLoggedInMiddleware */
private $onlyLoggedInMiddleware;

public function setUp() {
protected function setUp(): void {
$this->reflector = $this->createMock(IControllerMethodReflector::class);
$this->userSession = $this->createMock(IUserSession::class);
$this->onlyLoggedInMiddleware = new OnlyLoggedInMiddleware(
$this->reflector,
$this->userSession
);

return parent::setUp();
parent::setUp();
}

public function testBeforeControllerWithoutAnnotation() {
Expand Down
4 changes: 2 additions & 2 deletions tests/unit/Settings/AdminTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ class AdminTest extends \Test\TestCase {
/** @var IConfig|\PHPUnit_Framework_MockObject_MockObject */
private $config;

public function setUp() {
protected function setUp(): void {
$this->l10n = $this->createMock(IL10N::class);
$this->defaults = $this->createMock(Defaults::class);
$this->config = $this->createMock(IConfig::class);
Expand All @@ -48,7 +48,7 @@ public function setUp() {
$this->config
);

return parent::setUp();
parent::setUp();
}

public function formDataProvider() {
Expand Down
4 changes: 2 additions & 2 deletions tests/unit/Settings/SectionTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,15 +32,15 @@ class SectionTest extends \Test\TestCase {
/** @var IURLGenerator|\PHPUnit_Framework_MockObject_MockObject */
private $urlGenerator;

public function setUp() {
protected function setUp(): void {
$this->l10n = $this->createMock(\OCP\IL10N::class);
$this->urlGenerator = $this->createMock(IURLGenerator::class);
$this->section = new \OCA\User_SAML\Settings\Section(
$this->l10n,
$this->urlGenerator
);

return parent::setUp();
parent::setUp();
}

public function testGetId() {
Expand Down
2 changes: 1 addition & 1 deletion tests/unit/UserBackendTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ class UserBackendTest extends TestCase {
/** @var \PHPUnit_Framework_MockObject_MockObject|ILogger */
private $logger;

public function setUp() {
protected function setUp(): void {
parent::setUp();

$this->config = $this->createMock(IConfig::class);
Expand Down

0 comments on commit 44af25c

Please sign in to comment.