Skip to content
Snippets Groups Projects
Commit c89382f7 authored by Dyszczo's avatar Dyszczo
Browse files

Merge branch 'feature/ci-files' into 'master'

Feature/ci files

See merge request !16
parents 6c970f95 0ff251fd
No related branches found
Tags 1.0
1 merge request!16Feature/ci files
Pipeline #7739 failed with stages
in 4 minutes and 17 seconds
# This file is for unifying the coding style for different editors and IDEs
# editorconfig.org
# WordPress Coding Standards
# https://make.wordpress.org/core/handbook/coding-standards/
root = true
[*]
charset = utf-8
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true
indent_style = tab
[*.yml]
indent_style = space
indent_size = 2
[*.md]
trim_trailing_whitespace = false
\ No newline at end of file
destination: docs
templateConfig: /app/theme-woocommerce/config.neon
extensions: [php]
source:
- classes
exclude:
- vendor
- tests
- languages
charset: [UTF-8]
main: Wordpress plugin
title: Plugin template more info
baseUrl: "/"
templateTheme: default
php: false
sourceCode: false
tree: true
deprecated: false
todo: false
download: false
accessLevels:
- public
- private
- protected
\ No newline at end of file
<?xml version="1.0"?>
<ruleset name="WordPress Coding Standards for WP Desk Plugin">
<description>Sniffs for WordPress WPDesk plugins</description>
<config name="installed_paths" value="vendor/wp-coding-standards/wpcs,vendor/wimg/php-compatibility" />
<rule ref="PHPCompatibility"/>
<config name="testVersion" value="5.5-"/>
<rule ref="WordPress"/>
<config name="text_domain" value="wpdesk-plugin,default,s214-settings-demo"/>
<arg name="extensions" value="php"/>
<file>./classes</file>
<exclude-pattern>*/settings-api/*</exclude-pattern>
</ruleset>
<phpunit bootstrap="tests/integration/bootstrap.php"
backupGlobals="false"
>
<testsuites>
<testsuite>
<directory prefix="test-" suffix=".php">./tests/integration</directory>
</testsuite>
</testsuites>
<filter>
<whitelist>
<directory suffix=".php">classes</directory>
</whitelist>
</filter>
<logging>
<log type="junit" target="build-coverage/report.junit.xml"/>
<log type="coverage-html" target="build-coverage/coverage" charset="UTF-8" yui="true" highlight="true"/>
<log type="coverage-text" target="build-coverage/coverage.txt"/>
<log type="coverage-clover" target="build-coverage/clover.xml"/>
</logging>
<php>
<env name="WP_DEVELOP_DIR" value="/tmp/wordpress-develop"/>
<env name="WC_DEVELOP_DIR" value="/tmp/woocommerce"/>
</php>
</phpunit>
\ No newline at end of file
<phpunit bootstrap="tests/unit/bootstrap.php">
<testsuites>
<testsuite>
<directory prefix="test-" suffix=".php">./tests/unit/</directory>
</testsuite>
</testsuites>
<filter>
<whitelist>
<directory suffix=".php">classes</directory>
</whitelist>
</filter>
<logging>
<log type="junit" target="build-coverage/report.junit.xml"/>
<log type="coverage-html" target="build-coverage/coverage" charset="UTF-8" yui="true" highlight="true"/>
<log type="coverage-text" target="build-coverage/coverage.txt"/>
<log type="coverage-clover" target="build-coverage/clover.xml"/>
</logging>
</phpunit>
\ No newline at end of file
<?php
ini_set('error_reporting', E_ALL); // or error_reporting(E_ALL);
ini_set('display_errors', '1');
ini_set('display_startup_errors', '1');
// disable xdebug backtrace
if ( function_exists( 'xdebug_disable' ) ) {
xdebug_disable();
}
if ( getenv( 'PLUGIN_PATH' ) !== false ) {
define( 'PLUGIN_PATH', getenv( 'PLUGIN_PATH' ) );
} else {
define( 'PLUGIN_PATH', __DIR__ . DIRECTORY_SEPARATOR . '..' . DIRECTORY_SEPARATOR . '..' . DIRECTORY_SEPARATOR );
}
require_once( getenv( 'WP_DEVELOP_DIR' ) . '/tests/phpunit/includes/functions.php' );
tests_add_filter( 'muplugins_loaded', function () {
$plugins_to_active[] = 'hello.php';
update_option( 'active_plugins', $plugins_to_active );
}, 100 );
putenv('WP_TESTS_DIR=' . getenv( 'WP_DEVELOP_DIR' ) . '/tests/phpunit');
require_once( getenv( 'WC_DEVELOP_DIR' ) . '/tests/bootstrap.php' );
<?php
/**
* PHPUnit bootstrap file
*/
require_once __DIR__ . '/../../vendor/autoload.php';
error_reporting( E_ALL );
if ( getenv( 'PLUGIN_PATH' ) !== false ) {
define( 'PLUGIN_PATH', getenv( 'PLUGIN_PATH' ) );
} else {
define( 'PLUGIN_PATH', __DIR__ . DIRECTORY_SEPARATOR . '..' . DIRECTORY_SEPARATOR . '..' . DIRECTORY_SEPARATOR );
}
if ( getenv( 'ABSPATH' ) !== false ) {
define( 'ABSPATH', getenv( 'ABSPATH' ) );
} else {
define( 'ABSPATH', PLUGIN_PATH . '..' . DIRECTORY_SEPARATOR . '..' . DIRECTORY_SEPARATOR );
}
WP_Mock::setUsePatchwork( true );
WP_Mock::bootstrap();
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment