The tag has no usage guidance.

learn more… | top users | synonyms

0
votes
1answer
17 views

How to automate post update website check?

I maintain clients' Wordpress websites (~25 installations) as a part of my job. To do this quickly and efficiently I use Jetpack's "Manage" feature. In case something went wrong I have fully automated ...
1
vote
1answer
37 views

How to test drive WordPress on VPS with LEMP stack before going live?

I have example.com up and running on a VPS droplet running Ubuntu 16.04. The website was built with WordPress on LEMP stack (Linux EngineX MySql and PHP) which was done using EeasyEngine. EasyEngine ...
5
votes
1answer
66 views

Proper unit testing in WordPress

There are different threads available for Unit Testing in WordPress. As far as concern, there should be a proper unit testing for every piece of customization done in WordPress. I have checked couple ...
1
vote
0answers
38 views

Can I check plugins and themes for PHP 5.6 ahead of global PHP server Update

My server is updating to PHP 5.6 next week. I manage about 30 WordPress websites. I looked for a plugin that would check if any of the code throughout the other plugins and theme would break with the ...
1
vote
0answers
12 views

Is there a way to mock update_option for unit testing?

I'm currently building some unit tests, and have just started playing around with WP_Mock. I'd like to test a function that fetches the site description; I want to test if it responds as expected when ...
0
votes
1answer
45 views

A/B test options at the widget level [closed]

I am looking for a method to show 1 of 3 different widgets on my site's homepage. I could do this with javascript, but this would increase page weight and I would rather do it at time of render (...
1
vote
1answer
113 views

Unit testing in the WordPress backend (is_admin() is true)

I've asked this on IRC, Twitter, Slack — am utterly astonished by how difficult it is to locate the answer to this: I have a bunch of plugin code that only runs when is_admin() returns true, i.e., ...
1
vote
0answers
71 views

How to run subversion and staging environments when running Wordpress

I come from a .NET world with custom solutions, where I am used to multiple staging environments and subversion for everything. I've been googling a lot, and have some questions on how handle highend ...
0
votes
0answers
153 views

WP Unit tests error: WP_UnitTestCase not found

I installed PHPUnit, checked out the WordPress tests repository and set up the tests configuration. But when I try to run the unit tests on my test files (e.g: phpunit test-test.php), I get the ...
0
votes
0answers
160 views

How to use Wordpress methods (themes, plugins, context) with Behat?

My Wordpress project is running with a composer inside my plugin folder, just to test Behat a little bit, i'm not using Bedrock Wordpress yet. I can run Behat to do some behavior tests using the ...
0
votes
1answer
37 views

How to properly maintain a testing version of a site?

At my place of work we host many sites that almost all run Wordpress. Some of them are changed quite frequently, and emply e-commerce solutions such as WooCommerce. Consequently, these sites also use ...
2
votes
1answer
31 views

Is there a way to activate different theme for specified users? [closed]

I'm looking to allow beta testing of a theme on WordPress site in production. I was thinking of a plugin to check if WordPress user has been selected for beta phase, and if this evaluates to true ...
0
votes
1answer
101 views

Duplicate WordPress site to subdirectory but use same db?

I have tried to just copy the whole root folder into a subdirectory. I understand the .htaccess file has to be changed. But can't get it to work right. Is it something more than changing the htaccess ...
8
votes
3answers
303 views

Vagrant script to setup all the common PHP / WordPress version combinations

I am looking for a way to quickly and repeatedly set up testing / debugging environment for our plugin, most probably using Vagrant. Projects like VVV focus on a single-environment setup (or, a couple ...
0
votes
1answer
26 views

Available methods for a/b testing the content

I've been looking around for split testing solutions for wordpress and most answers point to the now-outdated shrimptest plugin. I'm not really interested in using a plugin anyway, unless I write it ...
1
vote
1answer
275 views

How to add an image for unit testing?

I have to test the function where it calls wp_get_attachment_image_src. How do I add an image for testing, because right now if I call this method it returns false.
16
votes
1answer
2k views

Testing hooks callback

I'm developing a plugin using TDD and one thing that i completely fail to test are... hooks. I mean OK, i can test hook callback, but how could I test if a hook actually trigger (both custom hooks ...
1
vote
1answer
297 views

How to initialize something in unit test before the init hook being called?

I've a simple PHP Unit written for WordPress and want the initialize code before the main 'init' action being called from the plugin I want to test, e.g. class MyPlugin_Test_Example extends ...
0
votes
0answers
27 views

Unit Test ignores stubbed method second time around in a dataProvider

I am writing a sample unit test that checks a title of a post for a token and if it exists add the post to a category. https://gist.github.com/matstars/bebedbacedd7a85d8dc7 In my test for this I am ...
1
vote
1answer
339 views

Activate different theme for temporary preview

I wanted that when i access my site with specific parameter, my site used a different theme at that moment (only temporarily, to show only to me as a preview). I want it for test purposes. Is there ...
2
votes
1answer
323 views

How to properly test a method that is called by an action hook

The constructor in my class adds an action to the 'init' action hook: class My_Custom_Post_Type { function __construct( $type ) { $this->type = $type; add_action( 'init', ...
0
votes
0answers
23 views

What is a good way to test that plugin upgrades have completed properly?

I'm working to automate plugin upgrades across all my WordPress installs. Part of that process is making sure the plugins upgraded correctly, didn't introduce errors and don't cause new conflicts with ...
1
vote
0answers
45 views

WordPress Automatic Testing Probelm

After much trial and error. I've managed to get the automatic testing setup and running. I'm running a test on a plugin that has no code. It's just the plugin header. Just to make sure everything is ...
3
votes
1answer
1k views

PHPUnit testing WordPress Plugin

Using answers on this site and from other resources, I have started writing my next plugin using PHPUnit tests and the WordPress test environment. Distilling down what I have in my plugin's bootstrap....
0
votes
1answer
69 views

How do you create a development site into a subdirectory of the live site?

I have a WordPress site at http://example.com and I want to create a clone development site at http://example.com/test. I want http://example.com/test to be its own root URL as well as the live one ...
0
votes
1answer
34 views

Change post date for testing purposes

Is there a way I can change a post date to preferably a different month and a year for testing purposes?
1
vote
1answer
1k views

Theme Check gives: Required: This theme doesn't seem to display tags?

I am testing my theme with Theme Check plugin and it shows this message: Required: This theme doesn't seem to display tags? Picture: How can i fix this?
3
votes
1answer
1k views

Why Can't PHPUnit UnitTest My Wordpress Website

I have been researching this issue for days and although many people ask this question I never found a clear and concise answer. I am running: PHP Unit: Version 3.7.21 WordPress: Version 3.5.1 OS: ...
1
vote
0answers
85 views

How to split test a menu item

I have four links in my main navigation menu, which is displayed on every page of my site. Link 1 | Link 2 | Link 3 | Link 4 I have a form that once completed is a goal/conversion and redirects to a ...
2
votes
1answer
2k views

How can I debug my database connection for unit testing?

I've set up a wordpress environment on my Mac with MAMP and I'm running 3.5.1 locally (i.e. http://localhost:8888/blog works). I'm trying to run the unit test suit from wordpress.org and having ...
0
votes
1answer
76 views

can I run the test suite without a web server?

I'm trying to set up a Test Driven Development environment and I was wondering if it's possible to run the WordPress test suite without a web server. I'm on a mac (10.7.5) and I've set up phpunit and ...
3
votes
1answer
660 views

WP_UnitTestCase missing?

I was looking at tests for wordpress and some, if not all the classes have WP_UnitTestCase but I cannot find the class, why do I care? I have downloaded The most up to date version of this from github ...
7
votes
2answers
3k views

PHP unit testing WordPress?

Given how WordPress is written and how it interacts with a database and given how its not very much OOP oriented, is there a way to unit test a theme? is there a way unit test a framework (not a theme ...
0
votes
2answers
774 views

Publishing Wordpress from stage to production server

I'm having trouble configuring wp-config.php correctly in a staged server environment. I'm being told that I should be working in my stage environment for Wordpress with an example address of http://...
3
votes
1answer
411 views

Can I get at WordPress code from inside a Selenium test?

I'm writing unit tests using PHPUnit and WP_UnitTestCase, and using Selenium for front-end testing. My Selenium test classes merrily click around my pages without trouble. What would be truly useful, ...
1
vote
3answers
874 views

Wordpress installation site folder move to the final site destination

My client have a site : business.com All the files of the old fashion site is there, images, video, html, css. i just made a folder called business.com/cms and installed wordpress here. FOr 2 month ...
1
vote
2answers
118 views

Plugin development: How many plugin and WordPress version combinations to support?

I'm developing a plugin (my first plugin), and I wonder how to think about [supporting and testing various plugin version and WordPress version combinations]. For example, if I develop a plugin, and ...
0
votes
1answer
57 views

Test site pages go to main site

I have a test site installed on www.mydomain.com/testsite. The problem I have is that if I type in the url www.mydomain.com/testsite/about I get redirected to www.mydomain.com/about. My page for my ...
2
votes
1answer
69 views

automated tests as a user?

I checked out (with svn) the code for Automated Testing. However, I want to run unit tests as a specific user. Is there a way to do that? That is, is there a way to loggin with php code alone?
5
votes
2answers
7k views

Show different theme for admin?

I'd like to test some theme changes on my live site, but I obviously don't want regular users seeing any errors that may arise from it. I'd like to just duplicate my theme folder and if I'm logged in ...
1
vote
2answers
1k views

How to transfer changes from test environment to live site?

As with most other software it's safer to try new plugins, configuration options or template changes in a separate testing environment, see e.g. WordPress local development environment. Most ...
1
vote
1answer
240 views

PHPSpec and WordPress

I installed PHPSpec and I'm wondering how should I get the WordPress environment up and running in order to run my tests; Essentially, now I can't access anything from the WordPress API as the test ...
10
votes
1answer
492 views

Developing, Testing and Releasing

How do you develop, test and deploy-to-live your Wordpress sites? Its always a bit of a faff I find, especially where databases are concerned - mainly due to the fact that having a testing site needs ...
0
votes
1answer
197 views

Testing performance of WordPress files

I would like to test the performance of PHP files in my installation, to find any bottlenecks. I already use plugins like Debug Queries and WPDB Profiler to watch the SQL Queries being generated, but ...
0
votes
1answer
280 views

Create a blank test.php

Sometimes it's necessary to figure out CSS errors or whatever and then it's great if you have a minimal test page where you just insert the specific code you want to test. How can I create such an ...
28
votes
1answer
330 views

How to perform unit testing on proposed patches in Trac?

I was looking for some insight and good resources on how to correctly perform unit testing on proposed WordPress patches in the Trac and how to accurately report the results from the testing. I'm new ...
1
vote
3answers
2k views

Duplicate a Wordpress Install for Testing Purposes

I want to test some plugins on my Wordpress site. However, I do not want to mess anything up. Is there a way to duplicate my Wordpress site to a new directory so that I can test plugins there before I ...
1
vote
1answer
112 views

A/B testing of posts with unique URLs for each variant AND editing in custom fields

I'm wondering if anyone could offer advice on how to think about creating an A/B testing plugin for posts that: A) lets me assign unique URLs for each variant post*1) and* B) is customizable on ...
6
votes
2answers
258 views

Creating Unique Post URLs for A/B Testing… Is this even possible?

I want to create a WordPress plugin that allows me to do A/B testing for WordPress standard posts, but I can't use the Shrimptest plugin because I need a spin: Since I'm ultimately testing ...
1
vote
2answers
98 views

Wordpress themes that are browser tested and maintained?

Are there any developers that offer themes that have a defined list of browsers tested, on desktop and mobile devices, that are also periodically updated to account for new browser versions?