Skip to content

Conversation

@javigomez
Copy link
Contributor

Since PHPCS 2.0 is available in PEAR people is installing it but our sniffers are not working with this development package. I'm adding this warning to warn people about installing 1.5 instead.

Bakual pushed a commit that referenced this pull request Jun 17, 2014
Add alert about PHPCS 2.0 not compatible with our sniffers
@Bakual Bakual merged commit acdd88d into joomla:master Jun 17, 2014
wilsonge pushed a commit to wilsonge/coding-standards that referenced this pull request Oct 1, 2018
* Create phpunit.appveyor.xml

the php unit file for app veyor DSN items

* Create appveyor.yml

First draft of the appveyor configuration

* Rename appveyor.yml to .appveyor.yml

* need PDO drivers in php.ini

* try host and password change

* try without password

* try absolute path

* revert absolute path

* Add PHP info output temporarily

* Don't need to manually import PDO, don't import OCI8, comment mssql for now

* Install sqlite

* Enable sqlite3 extension

* Add non-PDO PostgreSQL and MySQLi

* Set database credentials

* Attempt to create the DB tables

* Try postgres command line items

https://www.appveyor.com/docs/services-databases/

* default is PostgreSQL 9.4

* mysql port for appvoyer is 3306

* Database setup for mysql and postgreSQL

* fix directory spelling for mysql

* try without single - on each line

* try a different table create format

* adjust sql install lines

* fix yml parsing

* try fixing sql import

* fix yml parsing again

* password needed

* remove superfluous semicolon

* fix / vs \

* database setup for MSSQL

* Is powershell script without `- >` ?

* Is the powershell scripting needing single `-` ?

* Turn off php -i output, remove switch

* try with single -

* all powerscript items start with   - ps:

* completely redo the MSSQL table creation

* Don't need composer show output

* Try to detect the PHP version and download the needed DLLs

* do the DLL downloads before all the other items

* try tweaking the dll conditionals

* chain IF for && (and) equivalence

* try $Env:php_ver_target for condition

* Install DLLs after moving to php dir, install non-PDO DLLs, enable them

* try if as a powershell item

* try $env:PHP

* nul is batch syntax. In PowerShell you use $null

* try Remove-Item

* Specify postgresql94 since appveyor is now postgresql95 by default with postgresql

* Fix PHP 7.0 filenames, try /Y switch

* ... or not ...

* List directory contents, something's not right

* Now make sure the extensions are there

* try NTS.dll 

is the not thread safe the correct version to use?

* extension type nts

* SQLSVR host is (local)\SQL2014

* try adjusting MSSQL db create

* try adjusting pgsql db create

* dependencies: lowest is broken, just work with current

* is MSSQL interfering with other databases?

* is the mysql port causing problems?

* try sqlcmd -b -E -S

* before_build will never run with build: false, need to use before_test

this should fix the DB issues

* Fix pgSQL

* try to force PHP 5.6 to x86

* try to fix parsing error

* try fixing yml again

* should be valid yml now

* Simplify the IF %PHP%==1 conditions for echo block

only need to check once If ($env:PHP -eq "1") for the block of echo's

* revert condensed if check due to parse error

multiple errors of the following type
```bat
The output stream for this command is already redirected
```

* remove Get-ChildItem -Path c:\tools\php\ext

We no longer need this debug info as we solved the DLL load issue by using the right file version

* try setting USE $db in SQLSVR set up

* remove commented lines and unnecessary commands

* Fix the SQLSVR tests

Information based on the references below
It seems that PHPUnit deletes the content of the table in question before setting up the table to execute a test. That only works, if the table already exists. Therefore I’ve added a create table jos_dbtest statement with the PDO to fix the issue

PHP unit will perform a ‘clean insert’ operation on our database using the the dataset returned by getDataSet. The clean insert operation will truncate or delete_all any tables in the data set (not all tables in the database) and then insert the rows in the dataset. The solution is to create the table before running the test.

Additionally we can modify the default functionality by overriding the getSetUpOperation() and getTearDownOperation() methods

- https://andreas.heigl.org/2015/08/16/database-testing-with-phpunit-and-sqlite/
- http://stackoverflow.com/questions/10948273/loading-schema-from-sql-file-in-phpunit-test
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants