mirror of
https://github.com/nextcloud/passman.git
synced 2024-12-26 01:24:35 +08:00
Add phpunit tests
This commit is contained in:
parent
b28688e972
commit
76991470be
2 changed files with 6 additions and 9 deletions
|
@ -38,6 +38,8 @@ before_install:
|
|||
- nvm install 5.9
|
||||
- npm install -g npm@latest
|
||||
- npm install grunt-cli -g
|
||||
|
||||
|
||||
#
|
||||
before_script:
|
||||
# - if [[ "$DB" == 'pgsql' ]]; then createuser -U travis -s oc_autotest; fi
|
||||
|
@ -45,6 +47,8 @@ before_script:
|
|||
# - if [[ "$DB" == 'mysql' ]]; then mysql -u root -e "CREATE USER 'oc_autotest'@'localhost' IDENTIFIED BY '';"; fi
|
||||
# - if [[ "$DB" == 'mysql' ]]; then mysql -u root -e "grant all on oc_autotest.* to 'oc_autotest'@'localhost';"; fi
|
||||
- cd apps/$APP_NAME/
|
||||
- mkdir -p build
|
||||
- curl -sSL https://phar.phpunit.de/phpunit.phar -o build/phpunit.phar
|
||||
- npm install
|
||||
# - ./occ maintenance:install --database-name oc_autotest --database-user oc_autotest --admin-user admin --admin-pass admin --database $DB --database-pass=''
|
||||
# - ./occ app:enable passman
|
||||
|
@ -52,7 +56,8 @@ before_script:
|
|||
|
||||
script:
|
||||
- grunt jshint
|
||||
|
||||
- php build/phpunit.phar -c phpunit.xml
|
||||
- php build/phpunit.phar -c phpunit.integration.xml
|
||||
#after_failure:
|
||||
# - cat ../../data/owncloud.log
|
||||
|
||||
|
|
|
@ -37,12 +37,4 @@ class PageControllerTest extends PHPUnit_Framework_TestCase {
|
|||
$this->assertEquals('main', $result->getTemplateName());
|
||||
$this->assertTrue($result instanceof TemplateResponse);
|
||||
}
|
||||
|
||||
|
||||
public function testEcho() {
|
||||
$result = $this->controller->doEcho('hi');
|
||||
$this->assertEquals(['echo' => 'hi'], $result->getData());
|
||||
}
|
||||
|
||||
|
||||
}
|
Loading…
Reference in a new issue