我使用的是Spring 4.0.7,并且我试图在muApp中使用MockMVC进行测试,但是当运行时,总是会出现以下异常:
attr_accessor
我看到测试正在运行时,控制器不接受(Accept)json(当我将应用程序放入容器中时,一切正常):
<?php
{
global $woocommerce;
$targeted_id = 523;
foreach ( WC()->cart->get_cart() as $cart_item )
{
if($cart_item['product_id'] == $targeted_id )
{
$qty = $cart_item['quantity'];
break;
}
}
if ( $qty > 0 )
{
?> <button
onclick="location.href='http://noespecadotiendagourmet.com/paso-3/'"
type="button">
PASO SIGUIENTE</button> <?php
}
else
{
?> <button
onclick="location.href='http://noespecadotiendagourmet.com/paso-3/'"
type="button" disabled> PASO SIGUIENTE</button> <?php
}
?>