Skip to content

Commit

Permalink
Merge pull request #799 from ltb-project/update-phpunit
Browse files Browse the repository at this point in the history
Update phpunit
  • Loading branch information
coudot authored Sep 15, 2023
2 parents 76c96d5 + ca530ec commit f8c6e00
Show file tree
Hide file tree
Showing 9 changed files with 34 additions and 8 deletions.
17 changes: 17 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: CI

on: [push]

jobs:
build-test:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- name: PHPUnit Tests for php7.4
uses: php-actions/phpunit@v3
with:
configuration: tests/phpunit.xml
version: 5.7.25
php_version: 7.4
args: --coverage-text
5 changes: 2 additions & 3 deletions lang/ca.inc.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
<html><head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8"></head><body><pre>&lt;?php
<?php
#==============================================================================
# LTB Self Service Password
#
Expand Down Expand Up @@ -158,4 +157,4 @@
$messages['badquality'] = "La qualitat de la contrasenya és molt baixa";
$messages['tooyoung'] = "La contrasenya s'ha canviat massa recentment";
$messages['inhistory'] = "La contresenya es troba dins l'històric de les contrasenyes antigues";
</pre></body></html>
$messages['invalidsshkey'] = "Input SSH Key looks invalid";
1 change: 1 addition & 0 deletions lang/it.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -152,3 +152,4 @@
$messages['badquality'] = "La qualità della password è troppo bassa";
$messages['tooyoung'] = "La password è stata cambiata troppo di recente";
$messages['inhistory'] = "La password è nello storico delle precedenti";
$messages['invalidsshkey'] = "Input SSH Key looks invalid";
2 changes: 1 addition & 1 deletion tests/CheckPasswordTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

require_once __DIR__ . '/../lib/vendor/defuse-crypto.phar';

class CheckPasswordTest extends \PHPUnit_Framework_TestCase
class CheckPasswordTest extends \PHPUnit\Framework\TestCase
{
/**
* Test check_password_strength function
Expand Down
2 changes: 1 addition & 1 deletion tests/CheckSshkeyTest.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

class CheckSshkeyTest extends \PHPUnit_Framework_TestCase
class CheckSshkeyTest extends \PHPUnit\Framework\TestCase
{
/**
* Test check_sshkey function
Expand Down
2 changes: 1 addition & 1 deletion tests/CryptoTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
require_once __DIR__ . '/../lib/vendor/defuse-crypto.phar';
require_once __DIR__ . '/../lib/functions.inc.php';

class CryptoTest extends \PHPUnit_Framework_TestCase
class CryptoTest extends \PHPUnit\Framework\TestCase
{
/**
* Test encrypt and decrypt functions
Expand Down
2 changes: 1 addition & 1 deletion tests/HookTest.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

class HookTest extends \PHPUnit_Framework_TestCase
class HookTest extends \PHPUnit\Framework\TestCase
{
public function testCommand()
{
Expand Down
2 changes: 1 addition & 1 deletion tests/LangTest.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

class LangTest extends \PHPUnit_Framework_TestCase
class LangTest extends \PHPUnit\Framework\TestCase
{
/**
* Test language files for missing and excess translations
Expand Down
9 changes: 9 additions & 0 deletions tests/phpunit.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<?xml version="1.0"?>
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" colors="true" xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/9.3/phpunit.xsd">
<testsuites>
<testsuite name="main">
<directory suffix="Test.php">.</directory>
</testsuite>
</testsuites>
<logging/>
</phpunit>

0 comments on commit f8c6e00

Please sign in to comment.