►
From YouTube: Taming Magento Static Tests
Description
by Oleksandr Kravchuk
A
A
Actually
started
like
a
magenta
and
today
I'm
going
to
talk
about
Auto
time,
magenta
static
as
beast,
but
first
let
me
introduce
myself.
My
name
is
Alexandra
kravchuk
I'm
working
as
back-end
developer,
eight,
why
more
United,
Arab,
Emirates,
I'm,
certified,
Magento,
developer,
contributor,
maintainer
and
Magento
master
2020,
and
you
know
I
understand
that
even
magenta
master
right,
a
bad
cold
and
today
I
would
like
to
talk
a
little.
A
To
write
the
test
and
second
one
is
easy
to
execute
the
actual
behavior,
and
here
we
have
like
an
separation
between
these
two
parts.
Actually,
it
can
be
like
one
code
base,
but
it
still
communicate
with
some
middle
middle
environment.
In
our
case,
it
can
be
like
HTTP
protocol.
So
when
you
write
em
FTF
tests,
you
use
razor
browser
emulator
to
make
calls
calls
to
your
Magento
with
HTTP
and
the
same
when
you
write
functional
tests
to
test
API.
You
make
calls
with
your
client
and
this
one.
A
Yes,
you
are
right.
This
is
a
static
analysis
Oh
as
input
we
receive
not
information,
but
the
code.
Our
tests
have
some
rules
and
the
result
is
check
if
cold
is
matching
the
rules
and
I
think
the
most
brilliant
things
that,
in
case
of
static
tests,
you
need
to
fix
the
code,
but
not
like
write
a
new
tests,
and
if
we
can,
we
can
check
what
kind
of
static
tests
magenta
I
can
separate
like
four
different
groups.
A
B
A
Sub
groups,
which
I
call
a
different
tools
to
make
some
checks
in
the
PHP,
but
if
we
look
like
for
compatibility,
strict
types
and
copy
bases
how
it
works,
but
for
code
style,
code,
mess
and
static
analysis,
it's
become
more
interesting
in
this
case.
Static
analysis
in
mean
the
testing
of
with
static
analyzer.
A
A
A
If
you
say
like
PHP,
please
provide
me
tokens
for
this
part
of
code.
You
will
receive
the
picture
like
this
and
from
this
we
can
simply
understand
that
really
difficult
to
understand
anything
from
this,
but
for
PHP
code
sniffer.
You
will
say
that
you
violated
PS
or
to
rule,
and
you
forget
to
mention
the
new
line
at
the
end
of
the
file
and.
A
The
most
interesting
things
that,
in
such
case,
we
are
working
with
regularity.
We
we
know
that,
for
example,
in
our
quality
in
our
code,
if
we
have
like
a
function
declaration
that
there
should
be
a
white
space
after
white
space,
there
should
be
a
name
of
the
function,
but
in
some
cases
there
can
be
no
name
because
it
can
be
anonymous
function.
And
then
there
can
be
like
decoration.
A
Must
be
a
white
space
and
mice
must
be
a
variable.
They
can
be
any
variable,
so
this
information
is
pretty
enough
to
make
make
make
testing
vorse,
except
if
you
would
like
to
check
that
this
code
is
full
of
some
coding
standards,
if
anything
if
every
new
line
is
placed
correctly
and
etc.
But
what's
the
problem
with
these
checks,
that
is
provided
only
how
code
looks
like
without
any
understanding
of
the
real
meaning
of
this
code.
It's
like
if,
like
I,
don't
know.
A
If
someone
asked
me
to
read:
Chinese
I
can
but
I
do
not
understand
anything
and
try
to
reach
some
meaning
of
what
is
right
here.
They're
a
little
bit
there
real
tricky
things
are
exist
and
one
of
the
things
is
his
name
abstract,
syntax
tree.
So
one
of
the
way
to
to
show
that
to
to
to
to
extract
some
meaning
from
the
code,
so
it
works
the
same.
A
It
works
with
its
provide
its
tokens
from
the
code,
and
then
it's
build
a
syntax
tree.
But
before
this,
let's
come
back
to
our
example,
what
we
can
see
here
we
have
like
on
the
top
level,
we
have
like
two
two
things
to
do.
First,
one
is
to
declare
a
function,
and
second
one
is
to
call
this
function
with
echo
when
inside
the
function
we
have,
if
statement
with,
with
its
own
condition
statement,
we
also
have.
A
Like
from
the
root,
we
have
two
sub
nodes.
First,
one
is
the
function
declaration.
Second,
one
is
the
ego
with
the
function
call
and
argument.
We
should
be
in
passive
this
function
declaration
we
have
list,
we
have
sub
mode
its
parameters
and
sub
lot
with
statements
which
include
this
function
and
the
statement
we
have
only
one
it's
Eve,
which
is
condition
and
statement
been
executed
in
the
case
of
cookies.
A
Some
separated
notes
to
check
the
end
path,
complexity
and
actually,
with
PHP
mass
detector
works.
It
builds
the
abstract
syntax
tree
with
elephants,
live,
live
library
and
use
PHP
reflection
to
collect
different
magics
and
check
if
your
codes
is
good
enough
to
meet
this
matrix
or
not,
and
also
alternative
library,
which
called
PHP
parser,
which
write
wrote
by
Nikita
Popov,
it
provides
possibility
not
only
to
build
abstract
syntax
tree,
but
also
create
a
visitor
which
can
traverse
this
tree,
and
he
is
the
visitor,
has
two
different
events.
First,
one
is
enters
a
note.
A
It's,
for
example,
when
you
meet
any
note
you
will
enter
the
note
will
be
a
band
called
and
after
you
will
reach
all
child
of
this
node
and
will
leave
from
this
node
to
its
parent.
They
will
be
called
event
leave,
node
and,
for
example,
what
how
it
can
be
used.
It
can
be
used
to
first,
one
is
to
raise
a
tree
and
collected
different,
magics
and
second
way
is.
It
can
be
used
to
modify
the
tree.
A
For
example,
if
you
have
tasks
to
check
our
court
and
remove
all
our
dumps,
which
someone
just
debug
it
the
code
and
proof
you
were
dumps
and
forget
it.
We
would
like
to
avoid
such
situations.
We
can
create
a
visitor
which
will
yield
will
run,
grows
the
build
a
tree
and
you'll
check
if
it
has
any
notes
which
our
expression
is
a
function
and
the
function
name
is
var
dump.
He
will
call
the
event
to
remove
this
node.
A
In
result,
we
will
receive
abstract
syntax
tree
result,
there
were
dump
boats
and
we
can
make
transformation
back
from
the
tree
to
the
code
and
write
it
and
voila.
We
refactor
this
code
with
automatic
canvas
automatic
rules,
and
probably
someone
can
think
that
it's
a
really
good
idea
to
create
some
of
the
motivation
in
this
case
and
provides
a
framework
to
simply
writes
rules
and
actions
which
need
to
be
done
in
some
cases
and
do
the
refactoring
of
some
routine
things
optimizer
and
easy.
A
Unfortunately,
this
tool
already
exists.
It
has
name
page
director,
its
code,
Reconstructor
tool
which
use
abstract
syntax
tree
and
static
analysis
to
modify
refactor
code
according
according
to
the
specific
rules
which
you
can
specify
the
most
interesting
thing
we
heard
about
this
tool.
It
was
the
presentation
of
one
guy
actually
not
remembers
name
the
last
year
in
the
key
of
the
hpow
days
conference.
A
In
case
I
don't
know,
should
we
believe
it
or
not,
but
in
any
way
we
have,
we
have
a
tool
which
can
automatically
reflector
the
code
and
finally
about
static
analysis.
I
mean
analysis,
aesthetic
and
elevators,
so
how
it
works.
First
of
all,
we
need
to
load
code
base
and
then
we
need
to
build
the
tokens
from
this
code
base.
We
can
use
the
fish
Peter
can
answer
here
and
then
we
need
to
build
abstractions
extreme.
A
We
can
use
the
PHP
parcel
library,
and
then
we
can
analyze
this
abstract
syntax
tree
with
for
static
analysis
and
receive
results
of
this
analysis
and
what
what
static
analyzer
can
do.
You
can
check
syntax,
just
ok,
anyone
Nicole.
It
also
can
check
that
all
methods,
variables
functions,
classes
and
constants,
which
you
used
are
they
exist.
A
It
also
can
check
that
PHP
in
up-to-date
in
your
code
and
the
most
the
most
powerful
and
brilliant
things
is
that
it
can
make
checks
with
type
in
which
you
write
so,
for
example,
that
if
your
function
is
expecting
to
receive
the
argument
string
first
argument
string,
it
will
check
that
all
places
she's
been
called.
The
string
is
possible
and
voiceover
seven
new
function
expected
to
return
boolean
value.
It
will
check
that
in
any
return
you
have
been
zero
function
will
return
the
borea
boolean
value.
This
is
the
most
I
think
which
differs
static.
A
And
one
of
them,
one
of
the
advantages
of
PHP
stand
that
it
can
run
and
not
the
check
for
the
full
database
but
run
the
check
for
there.
Some
specific
files
in
this
case
on
static
analyzer,
is
to
because
it
just
read
the
whole
files
in
your
project.
It's
a
built
giant,
abstract,
syntax
tree
and
started
to
analyze
the
fall
tree,
and
we
can
just
imagine
which
terrible
things
we
can
found
there.
A
Terrible
things
can
be
found
there
and
it's
do
not
interact
with
your
court
directly.
It's
only
reach
your
court,
like
some,
some
just
a
text
button
and
interact
with
your
code
in
case
when
it's
run
for
just
a
few
files,
it
can
found
I,
don't
know
some
references
for
another
classes.
It
doesn't
know
and
in
result
it
will
use
your
after
load
file
to
load
this
file
and
and
interact
with
them
to
make.
A
The
analysis
bleed
without
just
showing
the
error
that
we're
using
some,
not
existent
class,
very
smart
in
this
case
and
they're
really
easy
API
just
why
they
aren't
easy
to
extend
and
add
your
own
rules
for
your
own
checks
and
please
how
to
run
Magento
static
tests,
probably
and
prove
to
this
contribution.
I
think
most
of
us.
A
And
there's
a
little
bit
about
this
configuration
file,
so
you
can,
for
example,
it
can
be
useful
not
for
contributing
to
magenta,
because
when
you
contribute
to
magenta
there,
all
configurations
require
to
fall
because,
but
actually,
if
you
would
like
to
use
the
static
test
on
your
project
in
a
commercial
project,
you
can
edit
this
file
and
run
only
some
of
them,
which
can
be
really
useful
for
you
at
least
I
think
that
I've
got
that's
really
useful
tiny
project
and
it
thank
you
for
your
attention.
Probably
you
have
any
questions.
I.