summaryrefslogtreecommitdiffstats
path: root/tests/lib
Commit message (Collapse)AuthorAgeFilesLines
* Merge pull request #509 from tdiscuit/masterJaime Pérez Crespo2017-01-231-0/+1
|\ | | | | Add ability to define additional attributes on ContactPerson element
| * Address issues from unit testsTyler Antonio2016-11-091-0/+1
| |
* | Minor fixes.Jaime Pérez Crespo2017-01-122-70/+87
| | | | | | | | Formatting, namespaces, phpdoc.
* | Merge branch 'store-psr4' of https://github.com/sgomez/simplesamlphp into ↵Jaime Pérez Crespo2017-01-122-0/+309
|\ \ | | | | | | | | | sgomez-store-psr4
| * | Modified SimpleSAML_Store to PSR-4Sergio Gomez2016-12-052-0/+309
| | |
* | | Add a couple of methods to handle conversion between PEM and DER.Jaime Pérez2017-01-101-0/+50
| | | | | | | | | | | | This resolves #476.
* | | Minor phpdoc fixes.Jaime Pérez2017-01-101-6/+5
|/ /
* | Convert from CRLF to LF a couple of files remaining.Jaime Pérez2016-11-301-55/+55
| |
* | Fix tests depending on Language->language_namesHanne Moa2016-11-151-20/+42
|/
* Add unit test for AttributeConsumingService parsing. (#501)Thijs Kinkhorst2016-10-271-0/+44
|
* Remove tests for removed methodsHanne Moa2016-10-251-40/+1
|
* Change default domain from "ssp" to "messages".Jaime Pérez2016-10-121-1/+1
|
* Fix build.Jaime Pérez2016-10-041-4/+4
|
* Remove unused "use" statements and broken comments.Jaime Pérez2016-10-041-6/+0
|
* Add easy tests for SimpleSAML/Locale/TranslateHanne Moa2016-09-301-0/+38
|
* Test module \SimpleSAML\Locale\LocalizationHanne Moa2016-08-311-0/+87
|
* bugfix: Do not try to apply SSP's base URL if REQUEST_URI does not match.Jaime Pérez2016-08-221-2/+14
| | | | It is possible that the current script ($_SERVER['SCRIPT_FILENAME']) is inside SimpleSAMLphp's 'www' directory. However, even if that's the case, we should not enforce our base URL (as set in the 'baseurlpath' configuration option) if the request URI ($_SERVER['REQUEST_URI']) does not contain the relative path to the script. This is the case of AuthMemCookie, for example, where accessing a random URL protected by Apache, leads to the execution of a SimpleSAMLphp script, where SimpleSAML\Utils\HTTP::getSelfURL() must not try to be smart when guessing the current URL.
* Bump the version of the SAML2 library.Jaime Pérez2016-07-262-26/+26
| | | | Now we are finally using the 2.x branch of the SAML2 library, which was also migrated to use namespaces. Even though the library provides an autoloader that allows loading the classes with the old names using class aliasing, we need to do the migration in one commit (at least for most part of it). This is due to the way SimpleSAMLphp checks data types, using inheritance to check objects agains abstract or more general classes. Even though class aliasing works, there's no way to replicate those relationships, and type checks that use the old class names will fail because the aliases are virtually new classes that don't inherit from others.
* bugfix: Restore the capability to get our self URL when invoked from a ↵Jaime Pérez2016-07-151-17/+81
| | | | | | | | | | third-party script. Recent fixes for URL guessing and building addressed bugs in the code that were preventing the 'baseurlpath' from being used properly. However, they introduced a new issue, as the code was assuming the current URL would always point to a SimpleSAMLphp script. This is not always true, of course, as any script can invoke our API and end up trying to get its own URL (for example, when calling requireAuth()). In order to fix this, we monitor mismatches between SimpleSAMLphp's installation path and the absolute, real path to the current script. When there's a mismatch, it means we are running a third-party script outside SimpleSAMLphp, and therefore we should NOT enforce 'baseurlpath'. This introduces an additional issue, as applications behind a reverse proxy may cause trouble to guess the right URL (we will use the URL as seen by SimpleSAMLphp in the server, which is not necessarily the same as the user sees with a reverse proxy in between). For the moment, we'll leave the responsibility to sort that issue out to implementors. It might be a good idea to add a page to the wiki explaining how to do this. This resolves #418.
* tests: Fix CI build.Jaime Pérez2016-06-271-8/+8
| | | | Now that we are using realpath() to try to obtain the URL relative to the base URL path of SSP, we need to use real scripts or realpath() will return an empty string.
* Lowercase true, false & null.Jaime Perez Crespo2016-06-081-34/+34
|
* Fix the tests to handle the new, more permissive behaviour of ↵Jaime Perez Crespo2016-06-081-34/+64
| | | | SimpleSAML_Configuration::getBaseURL(), and add tests for getBasePath() too.
* Change the implementation of SimpleSAML\Utils\HTTP::getSelfURL() and ↵Jaime Perez Crespo2016-06-081-0/+74
| | | | getSelfURLNoQuery() to honor the 'baseurlpath' configuration option instead of simply using the environment. They were actually broken since they were using it to build the scheme, host and port, but completely ignoring the path, rendering wrong URLs in between what was configured in 'baseurlpath' and the real information in the environment. This resolves #396, but also affects #5. The changes to getSelfURLNoQuery() in #391 are unnecessary now, since we now basically getting the full URL and remove the query afterwards.
* Make sure the modifications to $_SERVER in the tests do not go beyond each test.Jaime Perez Crespo2016-06-071-0/+20
|
* Add some tests for SimpleSAML\Utils\HTTP::addURLParameters().Jaime Perez Crespo2016-06-071-2/+45
|
* Allow regular expression matching of trusted.url.domains.Jon Dufresne2016-06-011-0/+73
| | | | Fixes #379
* Start using the new configuration exceptions, handling error situations that ↵Jaime Perez Crespo2016-04-201-14/+22
| | | | before led to blank pages or even worse.
* Add some tests for the new SimpleSAML\Utils\HTTP::guessBasePath().Jaime Perez Crespo2016-04-191-0/+47
|
* Complete the code coverage for SimpleSAML\Utils\Arrays.Jaime Perez Crespo2016-03-041-0/+3
|
* Typo.Jaime Perez Crespo2016-03-041-1/+1
|
* Fix mistake in the test just added.Jaime Perez Crespo2016-03-041-3/+4
|
* Complete unit testing for SimpleSAML\Utils\Time by adding test for ↵Jaime Perez Crespo2016-03-041-0/+43
| | | | initTimezone().
* Complete the coverage for SimpleSAML\Utils\Time::parseDuration().Jaime Perez Crespo2016-03-041-19/+45
|
* Add tests for SimpleSAML\Utils\Time::parseDuration().Jaime Perez Crespo2016-03-041-0/+77
|
* Initial test for SimpleSAML\Utils\Time.Jaime Perez Crespo2016-03-031-0/+21
|
* Rename Utils\HTTP::getSelfHostWithoutPort() to ↵Jaime Perez Crespo2016-03-031-6/+15
| | | | Utils\HTTP::getSelfHostWithNonStandardPort(), change the logic, and reimplement Utils\HTTP::getSelfHost() to depend on use the former. Complete the tests to include the case of port 443 while using HTTPS.
* Fixes issue 337Andrés Blanco2016-03-021-0/+35
|
* Move MetadataTest to SimpleSAML\Test\Utils\Config/MetadataTest.Jaime Perez Crespo2016-02-261-41/+44
|
* Move RandomTest to SimpleSAML\Test\Utils\RandomTest.Jaime Perez Crespo2016-02-261-3/+11
|
* Move Utils_ConfigTest to SimpleSAML\Test\Utils\ConfigTest.Jaime Perez Crespo2016-02-261-4/+10
|
* Move Utils_AttributesTest to SimpleSAML\Test\Utils\AttributesTest.Jaime Perez Crespo2016-02-261-16/+19
|
* Move Utils_ArraysTest to SimpleSAML\Test\Utils\ArraysTest.Jaime Perez Crespo2016-02-261-11/+14
|
* Move NetTest to SimpleSAML\Test\Utils\NetTest.Jaime Perez Crespo2016-02-261-38/+49
|
* Move CryptoTest to SimpleSAML\Test\Utils\CryptoTest.Jaime Perez Crespo2016-02-261-8/+19
|
* RegistrationInfo can be inherited from EntitiesDescriptorPatrick Radtke2016-02-241-7/+55
|
* Fix php 5.3 syntax issuePatrick Radtke2016-02-231-1/+2
|
* Expose RegistrationInfo in parsed metadataPatrick Radtke2016-02-232-1/+40
| | | | | - Add test case - Fix .gitignore since it ignored all metadata folders
* Add some tests for SimpleSAML\Module.Jaime Perez Crespo2016-02-221-0/+119
|
* Bugfix. While SimpleSAML\Database::query() returns a PDOStatement, ↵Jaime Perez Crespo2016-02-171-1/+1
| | | | SimpleSAML\Database::exec() doesn't. Make both return an integer with the amount of rows affected. Add a return value to SimpleSAML_Metadata_MetadataStorageHandlerPdo::initDatabase().
* Tests for SimpleSAML\Locale\Language::getLanguageList().Jaime Perez Crespo2016-02-091-1/+26
|
* Tests for SimpleSAML\Locale\Language::isLanguageRTL() + Typo.Jaime Perez Crespo2016-02-091-0/+30
|
* Add tests for SimpleSAML\Locale\Language::getDefaultLanguage() and fix other ↵Jaime Perez Crespo2016-02-091-4/+24
| | | | tests for the same class.
* Tests for SimpleSAML\Locale\Language::setLanguage().Jaime Perez Crespo2016-02-091-0/+22
|
* Tests for SimpleSAML\Locale\Language::getLanguageParameterName().Jaime Perez Crespo2016-02-091-0/+19
|
* Add some initial tests for the new SimpleSAML\Locale\Language class.Jaime Perez Crespo2016-02-091-0/+33
|
* Complete test coverage for SimpleSAML_Configuration::getEndpoints().Jaime Perez Crespo2016-02-041-2/+109
|
* Add more tests for SimpleSAML_Configuration.Jaime Perez Crespo2016-02-031-6/+27
|
* Add more tests for SimpleSAML_Configuration::getDefaultEndpoint() and ↵Jaime Perez Crespo2016-02-031-2/+55
| | | | SimpleSAML\Utils\Config\Metadata::getDefaultEndpoint().
* Add full test coverage to ↵Jaime Perez Crespo2016-02-031-0/+36
| | | | SimpleSAML\Utils\Config\Metadata::isHiddenFromDiscovery().
* Complete the test coverage for \SimpleSAML\Utils\Config\Metadata::getContact().Jaime Perez Crespo2016-02-031-0/+19
|
* Add some tests for valid SAML endpoint configurations parsing.Jaime Perez Crespo2016-02-031-0/+141
|
* Add a test for SimpleSAML_Configuration::getConfigList().Jaime Perez Crespo2016-02-021-0/+17
|
* Make it possible to pre-load a configuration array into ↵Jaime Perez Crespo2016-02-021-0/+31
| | | | SimpleSAML_Configuration for subsequent calls to getInstance() to use it. This opens up for unit-testing code that calls SimpleSAML_Configuration::getInstance().
* Clean one-liner comments.Jaime Perez Crespo2015-11-061-1/+1
|
* s/simpleSAMLphp/SimpleSAMLphp/gJaime Perez Crespo2015-11-061-1/+1
| | | | (being respectful with occurences that might change the behaviour, i.e. default database prefixes)
* Fix tests for SimpleSAML\Utils\Attributes::getExpectedAttribute().Jaime Perez Crespo2015-09-011-4/+43
|
* Basic reformatting.Jaime Perez Crespo2015-09-011-11/+24
|
* Refactor SimpleSAML\Utils\Arrays::normalizeAttributesArray() to ↵Jaime Perez Crespo2015-09-012-49/+53
| | | | SimpleSAML\Utils\Attributes::normalizeAttributesArray().
* Add a new \SimpleSAML\Utils\Attributes class.Jaime Perez Crespo2015-09-011-0/+101
|
* Refactor SimpleSAML_Auth_State::extractPersistentAuthState() to ↵Jaime Perez Crespo2015-08-251-7/+7
| | | | getPersistentAuthData() to avoid confusions around the behaviour of this method.
* Move SimpleSAML_Auth_Default::extractPersistentAuthState() to ↵Jaime Perez Crespo2015-08-121-0/+81
| | | | SimpleSAML_Auth_State::extractPersistentAuthState() and deprecate the former.
* Merge branch 'master' of https://github.com/tldev/simplesamlphp into ↵Jaime Perez Crespo2015-08-111-0/+49
|\ | | | | | | feature/config-from-env
| * Added tests for getConfigDirTom Johnell2015-07-221-0/+49
| |
* | Move the DatabaseTest to tests/lib/SimpleSAML/ where it belongs. Reformat ↵Jaime Perez Crespo2015-07-311-0/+297
| | | | | | | | code. Fix a few issues with phpdoc. Removed some unused variable. Use typed methos from SimpleSAML_Configuration instead of getValue().
* | Reimplement \SimpleSAML\Utils\Crypto::aesDecrypt() and ↵Jaime Perez Crespo2015-07-201-3/+3
| | | | | | | | \SimpleSAML\Utils\Crypto::aesEncrypt() to use openssl instead of mcrypt. This removes the direct dependency on mcrypt and closes #228.
* | Use always the private methods to test AES encryption/decryption.Jaime Perez Crespo2015-06-221-2/+8
| |
* | Move the aes[En|De]crypt() functionality in \SimpleSAML\Utils\Crypto to ↵Jaime Perez Crespo2015-06-201-0/+72
| | | | | | | | internal methods where the secret is passed as a parameter. Then we don't need a working configuration to test the functionality.
* | Revert "Add some tests for SimpleSAML\Utils\Crypto."Jaime Perez Crespo2015-06-141-48/+0
| | | | | | | | This reverts commit aec9571dc85c861ac0b6e081782aae30f9b6d2c1.
* | Add some tests for SimpleSAML\Utils\Crypto.Jaime Perez Crespo2015-06-141-0/+48
|/
* Add tests for SimpleSAML\Utils\Random.Jaime Perez Crespo2015-05-271-0/+18
|
* Fix namespace in phpdoc.Jaime Perez Crespo2015-05-271-1/+1
|
* Fix typos.Jaime Perez Crespo2015-05-271-2/+2
|
* Add tests for most functions in SimpleSAML_Configuration.Olav Morken2015-05-271-0/+525
| | | | | Add tests for most of the data retrieval functions. No tests for the metadata functions present though.
* Simplify phpunit test structure.Olav Morken2015-05-264-0/+581
* One test suite for all tests. * One file per class that is tested. These changes should make it easier to add new tests.