►
From YouTube: How to port tests from Drupal to Backdrop
Description
How to port module tests from Drupal to Backdrop CMS
A
A
Not
right
I
think
over
here,
alright,
so
the
module
that
I'm
working
on
porting
is
autocomplete
widgets,
which
is
something
that
I
really
love
in
Drupal
7
and
like
tees
and
backed
up
and
I,
basically
have
a
working
version
of
the
autocomplete
widgets
module.
On
my
backdrop,
site
I've
done
everything,
except
for
poured
the
tests
so
I'm
going
to
show
you
guys
how
I
normally
port
the
tests
so
I'm
gonna
start
here
with
the
autocomplete
widgets
module
has
a
test
directory
inside
of
it
and
it
has
an
autocomplete
widget,
stop
test
file.
A
So
what
I've
done
I
said
added
a
new
file,
that's
called
autocomplete,
underscore
widgets
dot
tests,
dot
info
and
when
I
first
started
here,
this
house
is
completely
up
to
you
or
anything
here,
I
just
added
it,
but
what
I've
done
is
I've
copied
in
an
example,
test
definition
from
the
metastatic
module
just
so
they
have
something
to
follow
as
an
example.
So
in
the
tests
file.
The
first
thing
to
start
with
is
the
name
of
the
class.
A
The
second
one
does
so,
let's,
let's
start
with
that,
so
here
the
class
autocomplete
widgets
allowed
values
test,
we're
going
to
start
with
that
one,
and
so
so
inside
that
get
info
function
there
is
a
meme
defined
and
you'll
notice
that
in
our
info
file
we
have
a
name
line.
That's
required
so
I'm,
just
going
to
put
in
the
name
here
same
thing:
that's
a
magic
description
line,
so
we'll
grab
the
description
and
we'll
put
it
in
the
description
line
and
then
there's
a
grope
line.
A
A
But
that
should
be
enough
to
register
this
test
with
the
system.
So,
if
I
go
to
development
testing,
there
should
be
something
here
for
autocomplete
widgets.
That's
only
there
because
it
found
the
information
about
the
allowed
values
widget
tests.
We
just
added
a
lot
of
values,
widget
a
lot
of
ideas
which
right
here
so
I,
could
go
ahead
and
run
this
test
right
now
who
probably
fail,
but
we
could
try
it
and
see
what
happened.
A
Give
us
some
things
to
go
through
one
at
a
time
to
fix,
but
I
know
for
sure
that
there's
a
lot
of
Drupal
in
here
and
then
use
your
replace
this
backdrop.
So
that's
one
thing:
I
could
start
doing,
but
before
I
start
doing
that
I'm
just
gonna
see
if
there
are
any
other
testing
nearly
beat
keyboard.
So
here's
a
autocomplete
widget
field
data
test.
So
we're
going
to
add
that
one
too,
so
in
the
same
way
square
bracket
followed
by
all
the
stuff
look,
we
know
we
need,
including
here's
the
get
info
function.
A
And
we
have
descriptions
copy
the
description
as
well
touching
those
in
here
and
group
should
be
the
same:
I
don't
complete
widgets,
which
it
is,
and
then
the
file
is
the
same,
so
I'm
just
going
to
delete
that
get
info
functions.
We
don't
need
that
anymore
and
then
I'm
going
to
check
for
another
class.
A
little
thing
I
like
to
you
see
is
my
code.
Editor
lets
me
like
collapse
function,
so
this
kind
of
gives
you
a
way
to
keep
track
of
like
the
onesy
bad.
A
Let's
have
it
so
I'm
add
this
third
test
here
in
the
same
way
name
of
test
followed
by
all
of
this
stuff,
so
the
info
function
name
suggested
values,
legit,
we're
gonna,
go
ahead
and
add
that
one
we
have
a
description
and
you
can
see
that
the
group
is
the
same
for
this
one
as
well
so
I'll
pump
in
the
description.
That's
why
I
like
to
copy
and
paste
in
here.
So
it's
me
a
lot
of
different
copying
and
pasting
into
the
setup
functions
now
we
know
we've
done
that.
A
One
there's
the
fourth
test,
autocomplete
widget
snow
reference
test
fool
when
they
do
copy.
So
I
don't
know
this
will
work,
because
it
probably
depends
on
one
module
that
we
are
getting
in
backdrop,
but
I
feel,
like
general,
it's
a
good
idea
to
keep
code
around
that
you
might
need
later.
It's
pretty
easy
to
remove
it.
If
that
has
to
happen,
it
is
harder
to
add
it
back.
So
we'll
leave
it
for
now.
We
need
to
remove
later
we
can
sink
in
here
we're
going
to
delete
info
function.
A
Okay,
now
we've
done
all
of
the
tests
pending.
You
can
see
they
are
extending
the
autocomplete
widgets
based
test,
and
then
this
one
at
the
top.
It
didn't
have
a
get
info.
That
was
the
autocomplete
widget
space
test,
so
it
makes
sense.
It's
not.
A
testing
needs
to
be
run
in
the
same
way
of
all
the
other
ones.
It's
just
a
base
class
everything
else.
So
now
that
we've
added
everything
into
our
test
stuff
in
profile.
If
we
reload
the
tests
page,
it
should
not
find
this.
A
It
should
find
all
four
of
those
tests
that
we
have
connected
so
there
they
are
so
then,
usually
what
I
like
to
do
after
I
port,
the
tests
is
I,
run
the
entire
test
suite
and
see
what
fails
and
then,
if
only
one
of
them
feels
like
you,
go
back
and
rerun
that
one
for
my
debugging,
so
it's
faster,
but
at
least
gives
me
sort
of
a
complete
run.
All
the
way
through
before
I
actually
run
these.
So
I
mentioned
earlier
that
there
was
a
lot
of
drupal
and
you'd
be
converted
to
backdraft.
A
The
tests,
in
particular
are
really
heavy
on
using
the
word
gerbil
logistics
and
almost
all
of
the
internal
test
helper
functions
so
only
for
kiss
gerbil
the
backdrop
we
change
the
word
through
all
to
the
word
prop
so
I'm
just
gonna
go
ahead
and
do
a
global,
find
and
replace
I'm
gonna
make
it
case
sensitive
though
so
they
don't
accidentally
replace
lowercase
gerbils
upper
case,
your
pulse,
so
there's
the
upper
case,
one
and
then
I'm
gonna
do
the
same
thing
find
another
place,
lower
case
Drupal
with
lower
case
backdraft
find
place
off.
A
Okay,
now
I'm
hoping
it
will
mostly
work,
but
if
there's
any
changes
in
like
URLs
between
you're
going
back
up,
that
kind
of
stuff
is
usually
what
you
end
up
catching
here
and
fix
it.
So
go
ahead
and
run
them
all
run
tests
and
see.
What
happens
then
check
how
long
this
will
take.
Sometimes
it
takes
really
long
time.
So
it's
it's
really
fast.
Let
me
see
we
all
have
paused
the
video
and
we
can
see
where
we
end
up
when
we're
done.
A
This
is
cheating
a
little
bit
because
the
node
reference
module
I'm,
sorry,
the
autocomplete
widgets
module
was
so
somewhere
between
purple
and
backed
up
I
literally
changed
was
like
some
invitation
and
documentation
stuff
in
it
mostly
worked
after
to
the
info
box.
So
the
fact
that
this
all
passed
is
not
really
surprising
because
it
really
changed.
So
that's
great.
A
That
is
how
you
ported
tests
in
general,
it's
pretty
straight
for
you
just
copy
and
paste
something
that
was
in
the
get
info
method
interval
into
a
backup
version,
which
is
the
text
info
file
and
the
reason
that
we
did.
This
is
because
we
didn't
want
anything
to
have
to
automatically
skin
PHP
code
to
pull
out
information
that
may
be
valid
or
to
be
able
to
have
to
like
load
classes
in
order
to
get
the
information.
A
That
means
just
to
devote
a
list
of
tests,
so
the
info
files
is
the
method
that
we
used
to
do
that
for
modules.
So
we
had
some
students
and
methods
for
tests.
So
it's
a
little
bit
more
performant,
it's
a
little
less
error-prone
and
it
isn't
changed
so
there's.
Maybe
a
change
there,
but
hopefully
people
will
find
that
for
the
better
in
the
long
run.
So
that's
it.
I'm
gonna
go
ahead
and
stop
sharing
my
screen.